This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-04-22 17:20:46

meowmeow55
Scratcher
Registered: 2008-12-24
Posts: 1000+

Changing the "directory" of links in a certain area of HTML

I used SSI (Server-Side Includes) to include the header of my phpBB forum into other pages on my site. However, the links in the header are meant to be used from the /forum directory, and thus generate 404 errors when used anywhere else. Does anyone know how one would go about changing the directory of all the links in a certain area?


Yawn.

Offline

 

#2 2011-04-22 19:49:15

meowmeow55
Scratcher
Registered: 2008-12-24
Posts: 1000+

Re: Changing the "directory" of links in a certain area of HTML

Bumpz...


Yawn.

Offline

 

#3 2011-04-23 10:37:52

meowmeow55
Scratcher
Registered: 2008-12-24
Posts: 1000+

Re: Changing the "directory" of links in a certain area of HTML

Aaaand the next day there's still no posts.


Yawn.

Offline

 

#4 2011-04-23 12:17:35

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Changing the "directory" of links in a certain area of HTML

Use absolute URLs - instead of "path/file.php" use "http://www.site.com/path/file.php".

Hope this helps  wink


/* No comment */

Offline

 

#5 2011-04-23 13:35:10

meowmeow55
Scratcher
Registered: 2008-12-24
Posts: 1000+

Re: Changing the "directory" of links in a certain area of HTML

TheSuccessor wrote:

Use absolute URLs - instead of "path/file.php" use "http://www.site.com/path/file.php".

Hope this helps  wink

But the link targets are stored in the phpBB MySQL database, and the source HTML (before it's parsed by phpBB) simply has tokens with the appropriate name. Here, look at this code snippet:

Code:

<div id="site-description">
    <a href="/" title="Home page" id="logo">{SITE_LOGO_IMG}</a>
    <h1>{SITENAME}</h1>
    <p>{SITE_DESCRIPTION}</p>
    <p class="skiplink"><a href="#start_here">{L_SKIP}</a></p>
</div>

See the stuff in braces ({})? Those are tokens replaced when parsed by phpBB. This is the code when viewed in a web browser after being parsed by phpBB:

Code:

<div id="site-description">
    <a href=".." title="Home page" id="logo"><img src="./styles/proDark/imageset/concat_logo.png" alt="" title="" /></a>
    <h1>Total Concatenation</h1>
    <p>A site for discussion about computers, programming (Scratch-level or any), gaming, and me (Skirmisher/meowmeow55)</p>
    <p class="skiplink"><a href="#start_here">Skip to content</a></p>
</div>

I'm just trying to get those to always link to the file in /forum. So unless you want me to go through and put /forum in front of all the link targets, um...yeah.

Or if it's going to take this long, I may as well just do that.


Yawn.

Offline

 

#6 2011-04-23 18:12:19

meowmeow55
Scratcher
Registered: 2008-12-24
Posts: 1000+

Re: Changing the "directory" of links in a certain area of HTML

Skip it, I just added /forum/ to the front of all the link targets  big_smile . Reporting to be closed...


Yawn.

Offline

 

Board footer