Skip to main content
Topic: [ADDON] SimplePortal (Read 153232 times) previous topic - next topic
0 Members and 5 Guests are viewing this topic.

Re: [ADDON] SimplePortal

Reply #630

Quote from: Spuds – That first one is strange since that variable does not appear on that line.

I found what it was. I removed the bit about drag & drop of the blocks on portal page.
However, I had removed the main call for javascript. (Starts around 237)

Code: (FULL) [Select]
// We use drag and sort blocks for the front page
$javascript = '';
// Javascript to allow D&D ordering of the front page blocks, not for guests
if (($modSettings['sp_portal_mode'] == 1)
&& empty($_REQUEST['action']) && empty($_REQUEST['board']) && !($user_info['is_guest'] || $user_info['id'] == 0))
{
$modSettings['jquery_include_ui'] = true;
$javascript .= '
// Set up our sortable call
$().elkSortable({
sa: "userblockorder",
error: "' . $txt['portal_order_error'] . '",
title: "' . $txt['portal_order_title'] . '",
handle: ".sp_drag_header",
tag: ".sp_column",
opacity: 0.9,
connect: ".sp_column",
containment: "#main_content_section",
tolerance: "pointer",
href: "/",
placeholder: "ui-state-highlight",
axis: "",
});';
}


That's what had removed, but in reality, this is what needed to remove:

Code: (CORRECT) [Select]
// Javascript to allow D&D ordering of the front page blocks, not for guests
if (($modSettings['sp_portal_mode'] == 1)
&& empty($_REQUEST['action']) && empty($_REQUEST['board']) && !($user_info['is_guest'] || $user_info['id'] == 0))
{
$modSettings['jquery_include_ui'] = true;
$javascript .= '
// Set up our sortable call
$().elkSortable({
sa: "userblockorder",
error: "' . $txt['portal_order_error'] . '",
title: "' . $txt['portal_order_title'] . '",
handle: ".sp_drag_header",
tag: ".sp_column",
opacity: 0.9,
connect: ".sp_column",
containment: "#main_content_section",
tolerance: "pointer",
href: "/",
placeholder: "ui-state-highlight",
axis: "",
});';
}


Needed to leave this behind:

Code: (LEAVE) [Select]
// We use drag and sort blocks for the front page
$javascript = '';

Re: [ADDON] SimplePortal

Reply #631

See how easy it is to create:bug:  :grin:


Re: [ADDON] SimplePortal

Reply #633

:woozy_face:LOL

Re: [ADDON] SimplePortal

Reply #634

Quote from: Burke Knight –
Needed to leave this behind:

Code: (LEAVE) [Select]
// We use drag and sort blocks for the front page
$javascript = '';

One of my project programmers years ago was lamenting the code he inherited and was trying to "clean up"... told us in a progress meeting: "Until I put one of the nonsensical comments that I deleted back in, including all three trailing periods, the damn thing wouldn't compile!"  :confused:

:stuck_out_tongue:

// Deep inside every dilemma lies a solution that involves explosives //

 

Re: [ADDON] SimplePortal

Reply #635

And a minor update to 1.0.3

  • Prevent error when article attachment is missing.
  • Provide generic "not found" image for any missing article attachments
  • Add admin option to disable user ability to arrange blocks
  • Fix issue where the top menu was left on "Community" when viewing a board/etc, it now correctly show "Forum" as active
  • Article attachments were not working as expected when Auto Manage attachments was enabled.

http://addons.elkarte.net/feature/Simple-Portal.html


Re: [ADDON] SimplePortal

Reply #637

I would figure you had them since most are ones you reported  :cool: