Advertisement:

Author Topic: View Single Category  (Read 79815 times)

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,411
    • StoryBB/StoryBB on GitHub
Re: View Single Category
« Reply #140 on: August 30, 2014, 12:04:41 PM »
I would love to know if Google penalises sites that use this for duplicate content.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: View Single Category
« Reply #141 on: September 07, 2014, 02:46:29 PM »
The mod download site for this mod stated anyone interested in developing this mod should contact SleePy.  I did so.  SleePy agreed to transfer the mod to me, under the condition that I keep it free to the public.  I agreed to this condition.  SleePy approved and has transferred the mod to me.  Just so that y'all know  ;D

The unofficial mod was branded v2.1.9b.  It's now become official as version 2.2.0.
« Last Edit: September 07, 2014, 03:09:00 PM by dougiefresh »

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,411
    • StoryBB/StoryBB on GitHub
Re: View Single Category
« Reply #142 on: September 07, 2014, 02:47:29 PM »
Sounds awesome. Thanks for keeping the dream alive :)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: View Single Category
« Reply #143 on: September 17, 2014, 07:52:36 PM »
First post and mod description updated, giving proper credit to SleePy for creation of this mod and stating that the mod was taken over by me.....  I apologize for any confusion the first post and mod description for v2.2 gave anybody.

UPDATE: I am working to make this mod compatible with SimplePortal....  It will involve some rewriting of the code to make it work, though.... 

I also need to comb through this thread to find the compatibility issues (what needs to be installed before what), that way I can update the mod description properly....  It's kinda a "slap-my-mod-description-format-on-this-mod-without-researching-everything-more"-kinda issue....  ::)  If anybody wants to help me with this, please feel free as I've worked 23 hours over 2 days (fun.... NOT!)

I would love to know if Google penalises sites that use this for duplicate content.
I'm gonna tackle that issue as well....  I know there's a way to do so, but off the top of my head, I can't remember....

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: View Single Category
« Reply #144 on: October 20, 2014, 10:00:50 AM »
Uploaded v2.3 - October 20th, 2014
o Improved compatbility with TinyPortal at install time (SMF 2.0 only)
o Added compatibility with SimplePortal (SMF 2.0 only)

DO NOT INSTALL IF:
o In ./Themes/default/scripts/script.js, none of the operations are successful.  One should be successful....
o In Sources/QueryString.php, none of the three pairs of operations (1 and 2, 3 and 4, or 5 and 6) are successful.

Attach the affected file to this topic for further assistance installing this.


I've left the v2.2.0 version up on the mod download page in the event that anyone needs it.

Offline beanflying

  • Semi-Newbie
  • *
  • Posts: 94
  • Gender: Male
  • Caffeine Addict
    • @seabreezecoffee on Twitter
    • Seabreeze Coffee
Re: View Single Category
« Reply #145 on: December 22, 2014, 01:34:13 AM »
Just started playing with it on a Dream Portal based test site. Some quirks to overcome so will see how it goes :)

If anyone has any pointers on how to crunch the code and save some time would be great .
Owner of many many shiny toys.

Offline beanflying

  • Semi-Newbie
  • *
  • Posts: 94
  • Gender: Male
  • Caffeine Addict
    • @seabreezecoffee on Twitter
    • Seabreeze Coffee
Re: View Single Category
« Reply #146 on: December 23, 2014, 04:42:34 PM »
Replying to myself sort of.

Installed the mod and with some playing this url works fine for displaying single categories with Dream Portal installed.

http://www.xyz.com/index.php?action=forum;c=1

Which is fine for setting links off the menus or DP pages but when you click the headers of the categories it breaks and goes to the front page. Partal fix for what I wanted to do but if possible would be nice to sort out the category headers. :)
Owner of many many shiny toys.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: View Single Category
« Reply #147 on: December 23, 2014, 05:15:17 PM »
Lemme see what I can do to make this mod more compatible with Dream Portal....

Offline grandinquisitor

  • Newbie
  • *
  • Posts: 9
Re: View Single Category
« Reply #148 on: January 14, 2015, 10:57:41 PM »
Help would be greatly appreciated -- I upgraded my forum from SMF2.0.6 to SMF2.0.9 and now viewing the category page gives me this error:


You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY b.board_order' at line 23
File: /var/www/____.com/forum/Sources/Subs-BoardIndex.php
Line: 120

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.9, while your database is at version 2.0. The above error might possibly go away if you execute the latest version of upgrade.php.

I have Single Category Mod v2.1.9.  I downloaded 2.2.0 but it shows as the older version, and I can't uninstall v2.1.9 because of problems with QueryString.

Any help would be greatly appreciated!  Let me know if I need to upload anything.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,411
    • StoryBB/StoryBB on GitHub
Re: View Single Category
« Reply #149 on: January 14, 2015, 11:05:26 PM »
I'd suggest: Uninstall the SMF patches back to 2.0.6. uninstall Single Category 2.1.9, reinstall SMF patches, install updated Single Category mod.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline grandinquisitor

  • Newbie
  • *
  • Posts: 9
Re: View Single Category
« Reply #150 on: January 15, 2015, 02:11:32 PM »
Oddly I can't uninstall SMF 2.0.8.  It returns an error in Memberlist.php which I don't think I've ever modified. 

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,411
    • StoryBB/StoryBB on GitHub
Re: View Single Category
« Reply #151 on: January 15, 2015, 02:15:51 PM »
Which error fails? If you expand the list of changes, it will tell you how many changes, and then you can click on the little post icon to see what has actually failed.

I suspect it is failing on the test where it's trying to add 'serach_fields' which is a typo in some 2.0.8 installs but was fixed in later copies of 2.0.8 and 2.0.9 would definitely have fixed it regardless. It's probably OK to ignore that one, but if you're not sure, you can always ignore it for now, do the rest of the stuff outlined and then we'll look at whether that one file needs any more work doing to it (but after 2.0.9 is reinstalled, I doubt it)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline grandinquisitor

  • Newbie
  • *
  • Posts: 9
Re: View Single Category
« Reply #152 on: January 16, 2015, 12:01:31 PM »
Yep, that's it. 

Unfortunately now I have more problems uninstalling 2.0.7.  Two of the fails are on copyright notices, which is weird but not fatal.  Another fail is on Subs-Post.php, where it can't find
Code: [Select]
if (allowedTo('admin_forum'))
{
static $htmlfunc = null;
if ($htmlfunc === null)
$htmlfunc = create_function('$m', 'return \'[html]\' . strtr(un_htmlspecialchars("$m[1]"), array("\n" => \'
\', \'  \' => \'  \', \'[\' => \'[\', \']\' => \']\')) . \'[/html]\';');
$parts[$i] = preg_replace_callback('~\[html\](.+?)\[/html\]~is', $htmlfunc, $parts[$i]);
}

In the meantime I still can't uninstall Single Category v 2.1.9 because of errors in QueryString.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,411
    • StoryBB/StoryBB on GitHub
Re: View Single Category
« Reply #153 on: January 16, 2015, 12:08:59 PM »
It sounds like you have oddly old versions of things because there were several releases of several of the patches due to last minute things :(

So, at this point, can you reinstall back to 2.0.9? Let's at least get back to a point where we know where we are for sure.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline grandinquisitor

  • Newbie
  • *
  • Posts: 9
Re: View Single Category
« Reply #154 on: January 16, 2015, 12:23:35 PM »
Yeah I put off upgrading for a long time because I couldn't get it working, not realizing that I was a victim of the infinite loop fopen bug.  Back to 2.0.9 now.  Uninstalling Single Category 2.1.9 fails on:


Code: (Find) [Select]

Code: [Select]
oOption.value = aBoardsAndCategories[i].isCategory ? '?action=forumc=' + aBoardsAndCategories[i].id : '?board=' + aBoardsAndCategories[i].id + '.0';
Code: (Replace) [Select]

Code: [Select]
oOption.value = aBoardsAndCategories[i].isCategory ? '#c' + aBoardsAndCategories[i].id : '?board=' + aBoardsAndCategories[i].id + '.0';
It also has a second fail that's completely blank, which puzzles me.  That is to say, it just says "Code: (Find) [Select]" and then a blank box underneath, and "Code: (Replace) [Select]" with another blank box underneath.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,411
    • StoryBB/StoryBB on GitHub
Re: View Single Category
« Reply #155 on: January 16, 2015, 12:27:11 PM »
That particular edit is a bug in the code, it's looking for something slightly different to what it actually put there before.

If you look in the file it indicates for the first part of it:
Code: [Select]
oOption.value = aBoardsAndCategories[i].isCategory
Then replace that entire line with the line indicated, that would fix that one issue.

The other one is a bit weird. The old version appears to have been removed so I can't take a look at what's wrong with it :(
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline grandinquisitor

  • Newbie
  • *
  • Posts: 9
Re: View Single Category
« Reply #156 on: January 16, 2015, 12:46:13 PM »
In the 2.1.9 package, the relevant portion for QueryString.php reads:

Code: [Select]
<file name="$sourcedir/QueryString.php">
<operation>
<search position="replace"><![CDATA[board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html?' . SID . '\$2\"'", $buffer);
]]></search>
<add><![CDATA[c|board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html?' . SID . '\$2\"'", $buffer);
]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);
]]></search>
<add><![CDATA[c|board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);
]]></add>
</operation>
</file>

Offline grandinquisitor

  • Newbie
  • *
  • Posts: 9
Re: View Single Category
« Reply #157 on: January 17, 2015, 03:41:20 PM »
I've realized something odd.  The oOption.value line is actually in script.js, not QueryString.php.  v2.1.9 should have had the two changes listed above uninstalled, but I confess I'm having difficulty parsing it to figure out what exactly I'm supposed to be changing.  This is what I see in QueryString.php:

   
Code: [Select]
// This should work even in 4.2.x, just not CGI without cgi.fix_pathinfo.
if (!empty($modSettings['queryless_urls']) && (!$context['server']['is_cgi'] || @ini_get('cgi.fix_pathinfo') == 1 || @get_cfg_var('cgi.fix_pathinfo') == 1) && ($context['server']['is_apache'] || $context['server']['is_lighttpd']))
{
// Let's do something special for session ids!
if (defined('SID') && SID != '')
$buffer = preg_replace_callback('~"' . preg_quote($scripturl, '/') . '\?(?:' . SID . '(?:;|&|&amp;))((?:c|board|topic)=[^#"]+?)(#[^"]*?)?"~', 'sid_insert__preg_callback', $buffer);
else
$buffer = preg_replace_callback('~"' . preg_quote($scripturl, '/') . '\?((?:c|board|topic)=[^#"]+?)(#[^"]*?)?"~', 'pathinfo_insert__preg_callback', $buffer);
}

I hope this makes sense -- I also attached the v2.1.9 package.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: View Single Category
« Reply #158 on: April 10, 2015, 07:58:34 PM »
Uploaded v2.4- April 10th, 2015
o Updated for SMF 2.1 Beta 1
o Simplified the 2 operations in QueryString.php.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: View Single Category
« Reply #159 on: August 29, 2015, 10:06:49 AM »
Uploaded v2.5 - August 29th, 2015
o Removed support for SMF 2.1 Beta 1
o Added support for SMF 2.1 Beta 2