miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
The Other miniBB Support Forums / The Other /  
 

Internal links in MiniBB - absolute or relative URLs

 
Author Guest
~
#1 | Posted: 23 Sep 2008 11:00 
Hello,

after running a backup version of my external MiniBB on my home server the whole structure (forums, topics, posts) is recognized perfectly. But when I or my users want to insert in a post an internal link to another topic (of the same MiniBB-forum, e.g. to a similar discussion), we are forced to give the hole url instead of a relative MiniBB-internal link.

Like this :

I want to link topic 8 in forum 13, so I had to write the full url

http://www.myforum...//index.php?action=vthread&forum=13&topic=8

instead of something like

index.php?action=vthread&forum=13&topic=8


Is there a possibility to insert in main_post_form.html another icon activating a Java Script code which accepts relative linking to another topic ?

Cause of this problem I can't move my existing forum to another domain. Now I'm creating a new one and would really like to use MiniBB furthermore.


Thanks for help !
Rontu

Author Paul
Lead Developer 
#2 | Posted: 23 Sep 2008 13:30 
All links should consist of the full URL because:

a) It's related to security;
b) there is basically no easy way to recognize relative links correctly;
c) it's better for search engines to provide full links.

It's not quite related to the JavaScript code, it's internal miniBB parsing routine from bb_codes.php.

If you move forums to another domain, you just need to replace all older domain links in posts by the simple SQL command like this:

update minibbtable_posts set post_text=REPLACE(post_text,'http://www.olddomain.com','http://www.newdomain.com') where POSITION('http://www.olddomain.com' IN post_text)>0;
That way we have also replaced all internal links on our own forums when we have moved miniBB project from minibb.net to minibb.com.

Author Guest
~
#3 | Posted: 23 Sep 2008 15:53 
Great :-)

Many thanks for your help !

Rontu

Author EinfachClicken
Guest
#4 | Posted: 3 Nov 2008 05:29 
When I tried this, I made sure to double and triplecheck the path symbol by symbol in order to avoid making a mistake. No trailing "/" in the path either. Still it did not work. I received back ...

Query status: SQL query has error
Query error: Table 'MiniBB.minibbtable_posts' doesn't exist

We had the miniBB forum installed by you initially, early this year, so it's puzzling why a standard query like this wouldn't work? I'll get ahold of our server admin too, perhaps they know something that we don't? Just thought you should know though ...

Author Paul
Lead Developer 
#5 | Posted: 3 Nov 2008 05:41 
minibbtable_posts should be replaced with your own table's name. Most likely miniBB tables all are renamed by default.

I can't keep in memory all my customers cases, so if you start to implement something on your own, you hold all your own problems, not me. This query above is just a common example of the request, you shall substitute your own values properly, paying attention at those marked as italic.

Author EinfachClicken
Guest
#6 | Posted: 4 Nov 2008 05:48 
Paul, we changed absolutely nothing after you got done with the forum ... except for things that should be adjustable by default. Stuff like path corrections, header logos, footer info., and stuff like that. Nothing was done ... at least not that we're aware of ... that should have prevented the database update. I'm having our server admin checking into it right now and I'll keep you informed as to what we can find out. Perhaps that will help others later on, down the road ...

Author Paul
Lead Developer 
#7 | Posted: 5 Nov 2008 05:59 
Changing URL is already a big move, so you make you own things on your own risk, I can't be involved in that.

The Other miniBB Support Forums / The Other /
 Internal links in MiniBB - absolute or relative URLs
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑