I am displaying the recent posts on the home page. At the bottom of some of the blocks you see "Read More" which is pointing to the actual post in the forum. The URL has an extra slash "/" before the post name which makes the URL invalid. I.E http://www.mydomain.com/forum//topic.html I looked in the code. This is coming from the following code in the TPmodules.php
$row['body'] .= '...... <a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '".0>' . $txt['tp-readmore'] . '</a>';
So it looks like "ID_TOPIC" has an extra / at the beginning? How can I fix this?
PS. I have also SEO4SMF installed and turned on pretty URL. Could that have anything to do with this?
QuotePS. I have also SEO4SMF installed and turned on pretty URL. Could that have anything to do with this?
Yes, it just might ;)
Please take your time and fill in the needed info according to this.
Please read the Posting Guidelines.html (http://www.tinyportal.net/index.php/topic,581)
Thanks for the quick reply. Here is the needed information:
Link to my site: http://www.brostalk.com
SMF version: SMF ver. 1.1.7
TP version: TP ver. 1.0.6
Theme name and version: Megapolis
Mods installed: SEO4SMF, Time-Logged-in, Super Admin
Related Error messages: No Error message. But the "Read More" link at the bottom of recent posts doesnt work, because it has an extra slash "/".
What happends if you turn off the SEO and Search friendly url ?
I just tried it out and this is what happen:
With SEO & Friendly URL: http://www.brostalk.com/forum//fast_sex-t68.0.html; (Doesnt work)
Without SEO: http://www.brostalk.com/forum/index.php/topic,68.html (Works)
Without Friendly URL: http://www.brostalk.com/forum/index.php?topic=68 (Works)
So when both are turned on (default) it doesnt work. I would like to keep them both so SE come by often to index my site.
Any idea how I can fix this?
Will have to leave that question for Bloc or IchBin to answer, i know Bloc is working on using it for this site, so it would not be impossible, jut cant say how to make it happend though.
Thanks for your help.
I will wait on Bloc or IchBin to see if they have a solution for this issue.
Hi Bloc and IchBin,
Have you had a chance to take a look into this issue? Thanks in advance.
It is a friendly URL issue. I'm not sure what is causing it. I thought I remembered someone having this problem before, but I can't find the post here.
Thanks for the prompt reply. Since this is coming from below line of code:
$row['body'] .= '...... <a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '".0>' . $txt['tp-readmore'] . '[/url]';
Is there a way to change ID_TOPIC? IE. remove the extra "/" Sorry I am not a php expert. Your help is appreciated.
The friendly URL code is what's adding the / characters, so it would seem you would have to change that code, not the TP code.
I would contact the mod creator and ask him/her about it. Somewhere there should be (probably) a line of code that would check for any double / characters and remove one of them.
Thanks for the info. Friendly URL is not a mod. it is actually part of SMF 1.1.7 release.
But I will surely open a thread in SMF forum and see what what they say about it.
What I am really surprised about is, that nobody else has run into this issue.
I'm assuming by friendly url's that the SEO4SMF mod is what is the cause. Not the built in apache URL rewrites for SMF.
Quote from: IchBinâ„¢ on January 21, 2009, 05:47:02 PM
I'm assuming by friendly url's that the SEO4SMF mod is what is the cause. Not the built in apache URL rewrites for SMF.
No actually I am referring to the SMF option on the adminCP under "Features and Options" called "Search Engine Friendly URL". That is an option on the SMF 1.1.7 and doesnt have anything to do with the SEO4SMF. Anyway when I uncheck that option (Search Engine Friendly URL), then the Read More link underneat the recent page works. Because now it shows up like this:
http://www.brostalk.com/forum/index.php?topic=68
So to answer your question, I dont think this issue is caused by SEO4SMF. Any idea how I can fix it?
When you are asked what mods you have installed. You replied SEO4SMF. So which is it? A mod, or the SMF setting? Why would you mention SEO4SMF if you do not have it installed?
Quote from: IchBinâ„¢ on January 21, 2009, 09:08:35 PM
When you are asked what mods you have installed. You replied SEO4SMF. So which is it? A mod, or the SMF setting? Why would you mention SEO4SMF if you do not have it installed?
Sorry for the confusion. I have SEO4SMF mod installed. That is correct.
But "Search engine friendly URLs" option was there from the get go. I set that right after I installed SMF (before I installed SE04SMF). So I think that option has nothing to do with SEO4SMF.
Am I wrong or missing something?
SEO4SMF rewrites the URL's. Just like prettyURL's mod. This is where the problem is happening. It is not happening because of TP. Its a conflict between your SEO4SMF mod and TP. That is why its important to be precise and clear about your setup. As I said before, this has been talked about already so please use the search. I do believe the mod author has made many fixes to make his mod compatible with TP. If there is something he can suggest to TP to help, I'm sure Bloc would be glad to make some changes.
All right. Fair enough. Thanks for taking the time to explain this to me.
I will open a separate thread and see if I can get some help/support from the mod author.
I will let you know how it goes.
You know what they are telling me? "They (SEO4SMF and SE friendly URL) are not meant to be used together". Is that right? I thought they are two different things, do different things and meant to be used together. Am I wrong?
Cant really say as we dont develop any of them :-\
They both do the same thing, probably just different ways.