PDA

View Full Version : Links Page for vBulletin


Greg
08-18-2006, 01:45 AM
This simple vBulletin hack in will give you a two column links page for you to use for exchanging links with other websites.

You simply create a new template with the included links.html file contents in the zip file named links and upload the the links.php file in the zip to your forums folder.

You add links to each column as necessary with html in the vBulletin ACP template editor. Each style you use requires a copy of the links template.

Sonnie
08-19-2006, 11:24 PM
Thanks for this info noppid... unfortunately I don't understand how to get the info on web.

I've added the info to the links.html and uploaded both files to my forums root directory which is public_html/forums/

I'm not sure how to add the pages as templates or how you edit them in ACP. I used an html editor to prepare the links.html file.

Consider me not too intelligent.

Greg
08-20-2006, 01:05 AM
OK, My instructions usually assume alot. I don't write long winded instructions as a result.

The contents of the links.html, not the actual file, make up the contents on a template named links that you create in the vB style manager. In the style manager you click create new template. Name it links. Then copy and paste the contents of links.html into the input box for that template. You do not upload the links.html file.

Then to add links, you edit the links template you created adding html links with anchor tags.

You only upload links.php to your forums folder.

ie...

<a href="http://www.riderinfo.com/">Rider Info Motorcycle Forum</a> Your place to discuss everything about motorcycles.


Feel free to ask for more info if that's not enough. :)

Sonnie
08-20-2006, 03:19 AM
That got me what I needed. I have all the html content ready so all I need to do is create the template. Makes perfect sense to me now.

Thanks!

Sonnie
08-21-2006, 11:28 PM
I like this php page much better than CMPS and Web Templates. Much easier to customize for me.

Is there anyway to get it to where all I have to type on the URL is http://www.hometheatershack.com/links instead of links.php (leaving the .php off)?

Thanks!

Greg
08-22-2006, 08:05 AM
yes there is, you need a rewrite rule I think in htaccess. It can be done, but I'm not a htaccess/mod-rewrite rules expert. I may even be another htaccess command and not rewrite.

You could also put it in a folder named links as index.php rather then links.php and add a chdir command to the php to do this as well.

Sonnie
08-22-2006, 11:35 AM
I'm think I can find out how to do the rewrite... thanks.

I'm full of questions you know.

If I wanted to make another php page similar to the links page but name it "friends"... would I simply change the links.php file where you have "links" and insert "friends" and then rename to friends.php?

I know you know them, but here are the three lines with "link"... are these the correct changes:

define('THIS_SCRIPT', 'links'); change to 'friends'

$navbits = construct_navbits(array('' => 'Links')); leave as is

eval('print_output("' . fetch_template('links') . '");'); change to 'friends'

Greg
08-22-2006, 12:15 PM
You can change all three lines from links to friends. Plus, you make a copy of the new links template you created and name it friends.

You're doing good.

Sonnie
08-22-2006, 12:23 PM
Thanks...

Is there a particular reason that 'Links' in that $navbits line is capitalized?

I've been tinkering with this off and on for the last 48 hours and it seems fun.

Greg
08-22-2006, 01:14 PM
No reason at all except I hit the shift key I guess. That is the wording that will appear in the navbar breadcrumb and it can say whatever ya want. :)

Sonnie
08-22-2006, 01:31 PM
Okay.... I'm back to not doing so good then. lol

That wording doesn't show anywhere in my navbar as just "Links" .... at least a search for "Links" only found two entries:

<td class="vbmenu_control"><a href="links.php">Home Theater Links</a></td>

and

<td class="vbmenu_control"><a href="/manufacturers/" target="_blank">Manufacturer Links</a> </td>


Not that anything isn't working properly... just trying to understand that line, if I even need to understand it.


Btw... vBSEO's custom rewrite rule feature took care of the links.php to links... 'links\.php$' => 'links/'

Greg
08-22-2006, 07:09 PM
The breadcrumb is dynamic and the end of the breadcrumb when viewing the links page, you will see something like...

Computer Help Forum > Links

Editing that line in the php file will change the word links when a someone views the links page to whatever you make it say.

I dunno anything about vBSEO on what that means or why it did that. I don't have access to the code to help ya out with that if you are indicating it's a problem.

Sonnie
08-22-2006, 07:24 PM
Ah-ha... I see exactly what you mean now. I created another page and didn't change that line and it still reads "Links" instead of the page name. Cool... I learned something. Thanks!


There's no problem with that vBSEO rewrite function... it works perfect. The feature simply allows you to custom rewrite a url to whatever you want it be. Pretty neat feature really. Your instructions here and that rewrite feature are gonna be exactly what I've been looking for to create more pages.

Greg
08-22-2006, 07:43 PM
Ah-ha... I see exactly what you mean now. I created another page and didn't change that line and it still reads "Links" instead of the page name. Cool... I learned something. Thanks!


There's no problem with that vBSEO rewrite function... it works perfect. The feature simply allows you to custom rewrite a url to whatever you want it be. Pretty neat feature really. Your instructions here and that rewrite feature are gonna be exactly what I've been looking for to create more pages.

Sounds great, nice work. I'm not against vBSEO methods. They have their place. The sales hype however I can't help but challenge. In the end, those debates, while sometimes heated, do get a lot of information on the table and that can be beneficial.