Back to vBulletin 3.0 Add-Ons

[VB3 RC4] [vbAdvanced - Links 1.00] Addon: Latest Links block for vbAdvanced
Mod Version: 1.00, by ixian

This modification is in the archives.
vB Version: Rating: (0 vote - 0 average) Installs: 5
Released: 06 Mar 2004 Last Update: Never Downloads: 8
Not Supported  

UPDATED March 6th:

Whoops. Stupid me forgot to add in a template into the global var adv_index.php uses, as a result there was one uncached template. We don't like those, do we precious.

The instructions to modify adv_index.php have been updated accordingly.


First things first - The majority of the credit for this hack goes to Natch, who did the original version for vbIndex. I've converted it over to vbAdvanced, which has a (very) different way of handling custom blocks, and has a different template style as well.

I also took the liberty of modifying Natch's original get_hotlinks_cat.php file so that it orders the list by most recent addition, instead of most popular. You can of course use the original get_hotlinks*.php files from Natches hack if you want to order them that way - those files require no modification to work with this hack.

The attached file includes these instructions and my get_hotlinks_cat_date.php file. Download Natch's hack for the other two files, should you need them.

WHAT THIS HACK DOES:

It combines the Links Directory 1.0 addon created by AndrewD and the vbAdvanced portal by Tigga to give you a "Latest Downloads" block for your vbAdvanced Homepage.

New Files: 1 (3):

get_hotlinks_cat_date.php << To have links/downloads ordered by newest, from specific categories

(The next two files can be used as-is from Natch's original hack, linked above)
get_hotlinks.php << to have top # of all links / downloads
get_hotlinks_cat.php << To have top # from a specific category(s)

Files to Edit: 1
adv_index.php or whatever you renamed it to

New Templates: 2
links_hotlinks
index_linklist

Templates to edit: 1
Index Templates --> index

=============
INSTRUCTIONS:
=============
In adv_index.php (or whatever you have renamed it to):

Find:
Code:
'bbcode_quote'
Change To:

PHP Code:
'bbcode_quote',
'index_linklist',
'links_hotlinks' 

Find:
Code:
$custom2 = '';
Add Under:

PHP Code:
$linklist '';

$hotlinks = require('get_hotlinks_cat_date.php');  <!--- or whichever of the 3 files you wish to order the links by --!> 
Find:
PHP Code:
if ($vboptions['showcustom2'])
{
    
$getbgrow getrowcolor();
    eval(
'$custom2 = "' fetch_template('index_custom2') . '";');

Add Under:

PHP Code:
eval('$linklist = "' fetch_template('index_linklist') . '";'); 


Save and close your adv_index.php file. Upload after you've added the new templates, below.

Upload the file get_hotlinks_cat_date.php or Natch's original files get_hotlinks.php and get_hotlinks_cat.php if you are using one of them instead to your forumhome folder

NOTE: if you want more than 5 links listed, please edit the $limit variable at the top of those files.
NOTE: If you are using the standard Links 1.0 TABLE PREFIX or the VB table prefix, make the appropraite alrterations @ the top of your new files as well

Create a new template called links_hotlinks and populate it with:
PHP Code:
<tr>
<
td class="alt1">
<if 
condition="$linkstatus==1">
<
a href="$vboptions[bburl]/local_links.php?action=jump&id=$linkidtarget="_new">
<
span class="smallfont">$linkname</span></a>
<else />
<
span class="smallfont">$linkname (not available)</span></a>
</if>
</
td>
</
tr
OR, if you are using Natch's original get_hotlinks*.php files and want to order them by hits, use this instead so you get a hit count column:

PHP Code:
<tr>
<
td class="alt1">
<if 
condition="$linkstatus==1">
<
a href="$vboptions[bburl]/local_links.php?action=jump&id=$linkidtarget="_new">
<
span class="smallfont">$linkname</span></a>
<else />
<
span class="smallfont">$linkname (not available)</span></a>
</if>
</
td>
<
td class="alt2" align="right">
<
span class="smallfont">$linkhits</span>
</
span>
</
td>
</
tr
Create a new template called index_linklist and populate it with:

PHP Code:
<!-- Latest Links -->
<
table align="center" border="0" class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]width="100%">
<
tr>
<
td align="$stylevar[left]class="tcat">
<
span class="smallfont"><b>$vboptions[blockbulletLatest Downloads:</b></span>
<
tr>
<
tr><td class="alt2">
$hotlinks
</td></tr>
</
table>
<
br>
<!-- 
End Latest Links --> 
Edit Index Templates -> index and add the following
PHP Code:
$linklist 
Wherever you want the hotlinks box to show up (I put it under $custom2 myself; just search for that in your index template if you want a starting point).

Thanks once again to Natch for the original hack, AndrewD for the Links hack in the first place, and of course Tigga for vbAdvanced.

Download

This modification is archived and cannot be downloaded.

Screenshots

 

Similar Mods

[vbadvanced Gallery & Links] Number of contributed pics & links in profile vBulletin 3.5 Add-ons
Profile Enhancements vbadvanced Links 2.0beta Number of contributed links in profile vBulletin 3.6 Add-ons
scrolling news block addon for vbAdvanced vBulletin 3.0 Full Releases

vblts.ru supports vBulletin®, 2022-2024