News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

View Single Category

Started by dougiefresh, October 06, 2006, 12:19:19 AM

Previous topic - Next topic

Arantor

I would love to know if Google penalises sites that use this for duplicate content.

dougiefresh

#141
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.

Arantor

Sounds awesome. Thanks for keeping the dream alive :)

dougiefresh

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!)

Quote from: Arantor on August 30, 2014, 12:04:41 PM
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....

dougiefresh

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.

beanflying

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.

beanflying

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.

dougiefresh

Lemme see what I can do to make this mod more compatible with Dream Portal....

grandinquisitor

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.

Arantor

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.

grandinquisitor

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. 

Arantor

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)

grandinquisitor

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

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.

Arantor

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.

grandinquisitor

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]

oOption.value = aBoardsAndCategories[i].isCategory ? '?action=forumc=' + aBoardsAndCategories[i].id : '?board=' + aBoardsAndCategories[i].id + '.0';

Code: (Replace) [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.

Arantor

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:
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 :(

grandinquisitor

In the 2.1.9 package, the relevant portion for QueryString.php reads:

<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>

grandinquisitor

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:

   // 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.

dougiefresh

Uploaded v2.4- April 10th, 2015
o Updated for SMF 2.1 Beta 1
o Simplified the 2 operations in QueryString.php.

dougiefresh

Uploaded v2.5 - August 29th, 2015
o Removed support for SMF 2.1 Beta 1
o Added support for SMF 2.1 Beta 2

Advertisement: