Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
[VB3 RC4] [vbAdvanced - Links 1.00] Addon: Latest Links block for vbAdvanced Details »»
[VB3 RC4] [vbAdvanced - Links 1.00] Addon: Latest Links block for vbAdvanced
Version: 1.00, by ixian ixian is offline
Developer Last Online: Dec 2012 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 03-05-2004 Last Update: Never Installs: 5
 
No support by the author.

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 04-07-2004, 06:45 PM
ixian's Avatar
ixian ixian is offline
 
Join Date: Oct 2001
Location: Denver, CO
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by milkmycow
question, how do you specify the catagory to pull from?
Use my get_hotlinks_cat_date.php or the get_hotlinks_cat.php that comes with the hack - they both have a string near the top where you can edit the category numbers you want to use.
Reply With Quote
  #13  
Old 04-08-2004, 05:02 AM
Morrus Morrus is offline
 
Join Date: Jan 2002
Posts: 494
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lionel
I got it install no problem on the gold release, it is just the $linkhits that does not display on VB_advanced page. I get []. All permissions are set and it does display on main page.
Same problem here. It started when I upgraded to Links Directory 1.01, so maybe there's a change in the original links hack which affects this one?
Reply With Quote
  #14  
Old 04-14-2004, 03:54 PM
ixian's Avatar
ixian ixian is offline
 
Join Date: Oct 2001
Location: Denver, CO
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am taking a look at the links changes now. They probably just changed a variable.
Reply With Quote
  #15  
Old 04-20-2004, 01:36 PM
ixian's Avatar
ixian ixian is offline
 
Join Date: Oct 2001
Location: Denver, CO
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've updated the files in this hack to reflect some minor fixes. This works perfectly for me with vb 3.0.1/Links 1.10 now.
Reply With Quote
  #16  
Old 04-24-2004, 07:42 PM
r00t3d r00t3d is offline
 
Join Date: Feb 2004
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any way to display the number of downloads and file size in the latest download block?
Reply With Quote
  #17  
Old 04-24-2004, 09:17 PM
msimplay's Avatar
msimplay msimplay is offline
 
Join Date: Aug 2002
Location: UK
Posts: 1,059
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by r00t3d
any way to display the number of downloads and file size in the latest download block?
yeh that would be a good idea
Reply With Quote
  #18  
Old 05-04-2004, 10:35 AM
r00t3d r00t3d is offline
 
Join Date: Feb 2004
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anybody?
Reply With Quote
  #19  
Old 05-11-2004, 02:51 AM
XPsave XPsave is offline
 
Join Date: May 2004
Location: UK
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmz, very new to vbulletin, infact about a day in. ive installed the advanced portal, and downloads & links hack 1.21, and just now tried to install your hack, im not sure what ive done wrong... so ill post up my stuff in the hopes someone will see something silly

first off:
i have,
get_hotlinks_cat_date.php
get_hotlinks.php
get_hotlinks_cat.php
in www.mydomain.com/forums/
and index.php (adv_index.php) in www.mydomain.com

then,
i made all the changes to index.php (odly enough i got returned an error about an unexpected < , removing a comment fixed it <!--- or whichever of the 3 files you wish to order the links by --!> )

next goto links_hotlinks
Code:
<tr>
<td class="alt1"><span class="smallfont">
<if condition="$linkstatus==1">
<a href="$vboptions[bburl]/local_links.php?action=jump&id=$linkid" target="_blank">$linkname</a>
</if>
<if condition="$linkstatus>1">
<a href="$vboptions[bburl]/local_links.php?action=jump&id=$linkid" target="_blank">$linkname</a> [size: $linkstatus kb]
</if>
<if condition="$linkstatus<=0">
$linkname (not available)
</if>
</span>
</td>
<td class="alt2">
<span class="smallfont">[$linkhits]</span>
</td>
</tr>
Not exactly sure what the other code is, but i suspect it to be a new feature in the links hack

next index_linklist
Code:
<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[blockbullet] Latest Downloads:</b></span> 
<tr> 
<tr><td class="alt2"> 
$hotlinks 
</td></tr> 
</table> 
<br>
then modded the index template as stated.

put it all together and i get a block or rather the header to a block but no content, ive linked a file to see if it will appear, but still no list

im stuck anyone have any ideas?
Reply With Quote
  #20  
Old 08-25-2004, 06:33 PM
mariannet's Avatar
mariannet mariannet is offline
 
Join Date: Mar 2003
Location: Denmark
Posts: 118
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by XPsave
Hmmz, very new to vbulletin, infact about a day in. ive installed the advanced portal, and downloads & links hack 1.21, and just now tried to install your hack, im not sure what ive done wrong... so ill post up my stuff in the hopes someone will see something silly

first off:
i have,
get_hotlinks_cat_date.php
get_hotlinks.php
get_hotlinks_cat.php
in www.mydomain.com/forums/
and index.php (adv_index.php) in www.mydomain.com

then,
i made all the changes to index.php (odly enough i got returned an error about an unexpected < , removing a comment fixed it <!--- or whichever of the 3 files you wish to order the links by --!> )

next goto links_hotlinks
Code:
<tr>
<td class="alt1"><span class="smallfont">
<if condition="$linkstatus==1">
<a href="$vboptions[bburl]/local_links.php?action=jump&id=$linkid" target="_blank">$linkname</a>
</if>
<if condition="$linkstatus>1">
<a href="$vboptions[bburl]/local_links.php?action=jump&id=$linkid" target="_blank">$linkname</a> [size: $linkstatus kb]
</if>
<if condition="$linkstatus<=0">
$linkname (not available)
</if>
</span>
</td>
<td class="alt2">
<span class="smallfont">[$linkhits]</span>
</td>
</tr>
Not exactly sure what the other code is, but i suspect it to be a new feature in the links hack

next index_linklist
Code:
<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[blockbullet] Latest Downloads:</b></span> 
<tr> 
<tr><td class="alt2"> 
$hotlinks 
</td></tr> 
</table> 
<br>
then modded the index template as stated.

put it all together and i get a block or rather the header to a block but no content, ive linked a file to see if it will appear, but still no list

im stuck anyone have any ideas?
Bump on this one, I get the same empty box?
Reply With Quote
  #21  
Old 01-29-2005, 04:38 PM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is this being supported anymore?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:05 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04672 seconds
  • Memory Usage 2,348KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (8)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete