Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Links and Files Database Details »»
Links and Files Database
Version: 1.60, by AndrewD AndrewD is offline
Developer Last Online: Apr 2010 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 01-17-2004 Last Update: 07-25-2005 Installs: 238
DB Changes Template Edits
 
No support by the author.

The VB3.0 version is no longer supported although there have been no reported problems for some time

See here for the VB 3.6 version of this hack, which is now the supported version. This version currently also works with VB 3.5
See here for the VB 3.5 thread for this hack.

What's new in v1.60?

Option to display associated thumbnail images
Option to accept/not accept new entries if these already exists in database
Code for mass edits (accessed via admincp) tidied up
VB phrasing completed
Includes a full French and a partial German translation (thanks to cclaerhout, Allan and LeeWicKeD), handled properly by installation script.
Various bugs fixed and tested against php4 and php5:
Better database validation (on startup/in admincp: links with invalid associated forumids, categories with invalid parentids)
Alternative linkbit templates provided (default uses a fieldset, the other is the old-style table row)
Alternative category selection templates (pull down menu/list of checkboxes),
Star rating displayed using standard VB stars rather than in text form
Series of minor bug fixes
See file change.txt in zip file

What it is/does

- Provides a searchable database of weblinks and/or downloadable files, for example manuals, music files, pictures, etc.
- Integrates within VBulletin, without requiring any code changes.
- Transparently handles links and file downloads. (If you want to provide downloads from your own site, you need a separate tool to upload these files. This hack does not and will not include a file uploader.)
- Provides unlimited nested categories.
- Each link/file can be a member of multiple categories.
- Link and category title and descriptions can use all BBCODEs, giving the possibility to add images, colouring, etc, as you wish
- Viewing/access permissions controlled using VBulletin forum system
- Users can rate links, in a similar manner to VB thread rating.
- File downloads are semi-leechproof, i.e. the user does not see where the file is stored and can only access the link if she has access to the associated forum.
- Audio files playable via Windows Media Player can be offered as a jukebox .
- Tracks who downloads what
- Validates links on entry/editing, and provides admin facility to validate the entire database.

Installation/upgrading instructions

Read instructions.txt in the zip file. Installation script works out whether to install or upgrade.

To upgrade from an earlier release of this hack, simply re-run the installation script. If you modified the templates in the top styles, you will lose these modifications unless you back up and re-edit.

PLEASE BACK UP YOUR DATABASE

See also

For screen shots, see attachments.

Tested with

VBulletin 3.0 and higher
PHP 4.1.1 and 4.3.4, should work with all 4.x versions, seems ok with 5.0.4
MySQL 4.0.
Reported ok with MySQL 4.1 but not exhaustively tested

Credits

Initially inspired by drkFusion's vb2 hack "vb Link Directory" v.2 and discussion about v.3 on Vbulletin.org. This is a complete rewrite with many more features. Every credit to the VBulletin folks for providing the infrastructure and to those on vbulletin.org who have helped with testing.

Integrations/Conversions

Natch has written extensions to integrate this hack with VBindex and VBAdvanced.

For convenience, this hack includes fully integrates with, but does not install, his VBIndex hack - i.e. the required template and code are provided, and the admin panel handles the configuration settings. Please refer to his thread for instructions.

Integration with VBadvanced is described in thread 1319 at vbadvanced.com.

The zip file includes a script and instructions for converting from vbLinks v2 (see thread 44551

Show Your Support

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

Comments
  #832  
Old 02-11-2005, 04:47 AM
AndrewD AndrewD is offline
 
Join Date: Jul 2002
Location: Scotland
Posts: 3,486
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Imperial Fritz
I meant the uploaded links. Don't worry about the translations, I'll redo them manually, not much work as I did only a few pages.
Then you will be able to upgrade without problems. There is a minor bug on the admin pages of the available 1.52 , which will be fixed with the next upload this weekend.
Reply With Quote
  #833  
Old 02-11-2005, 07:02 PM
darcyb darcyb is offline
 
Join Date: Oct 2004
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh wow! I love this hack! THANK YOU SO MUCH!
Reply With Quote
  #834  
Old 02-11-2005, 09:37 PM
darcyb darcyb is offline
 
Join Date: Oct 2004
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had a table full of categorized link items already and wanted to migrate it into Links 1.51 so that it could become the foundation of my collection. It was a duplicated system up to this point where people would use a forum for URL discussion and I was manually updating a table with phpmyadmin. Anyway, this solution fixes all that.

So I wrote my own php script to import the stuff and I figured I'd share it here in case anyone else has to do something similar.
  1. First, use the Links interface to create enough categories to match the ones you were using before;
  2. Then, run a script sort of like the one I've included before to get the toc and linkslinks tables populated with stuff. I used a counter for the key indices and ignored whatever indices I had. I made my items query from newest to oldest (using whatever key IDs I had), as I didn't want to populate Links with older links at the top of pages. I used my own user account for the userid, and a datestamp from a manual link entry to generate the integer for the time.
  3. Although I did notice Links recount how many items were in each category and update the Category records while testing and clicking around, I did it manually anyway by querying (through phpmyadmin) with WHERE catid='n' (cat number) or whatever to get a count for how many items had imported into each category.
  4. Edit category records and insert the actual count of items imported for each.
All of this is a sloppy way of doing it and it shows that I'm a little new to all this. I couldn't get phpmyadmin to generate a CSV file while escaping the commas in my news article quotes, and it was tricking imports into thinking a grammatical comma was defining a new field, and it just wouldn't work.

I then had trouble with apostrophes from words like can't, so I had to use the addslashes() function on the titles and descriptions I was importing.

But it worked, and very well. I was able to populate Links with about 400 links, all into the right categories. Here's the ugly amateurish php script with some extra echo commands I used for testing. You can omit those:
Code:
<?php					
				
$link_id = mysql_connect("localhost", "username", "password");
	
$result=mysql_list_dbs($link_id);
	
mysql_select_db("dbase_name", $link_id);
	
$result=mysql_query("SELECT * FROM tbl_news where newsType in ('Media', 'Research', 'Opinion', 'Inspiration') order by newsID desc", $link_id);
	
if($result) {
	$idx_count=0;
	while($query_data=mysql_fetch_row($result)){
					
		$idx_count++;
					
		echo "IDX = $idx_count<br>";
					
		if ($query_data[2]=="Media")
			$catid=1;
		if ($query_data[2]=="Research")
			$catid=3;
		if ($query_data[2]=="Opinion")
			$catid=4;
		if ($query_data[2]=="Inspiration")
			$catid=5;
		echo "$query_data[2] catid=$catid<br>";
					
		$result2=mysql_query("INSERT local_linksltoc SET 
			ltoc='',
			linkid='$idx_count',
			catid='$catid',
			displayorder='$idx_count'", $link_id);
			echo "$idx_count, $catid, $idx_count<br>";
					
			$query_data[3]=addslashes($query_data[3]);
			$query_data[4]=addslashes($query_data[4]);
					
			$result3=mysql_query("INSERT local_linkslink SET
				linkid='$idx_count',
				linkname='$query_data[3]', // newsTitle field
				linkdesc='$query_data[4]',  // newsBody field
				linkurl='$query_data[5]',    // newsURL field
				linkhits='0',
				linkforum='-999',
				linkcheck='1108148258',   // whatever is "now"
				linkstatus='1',
				linkdate='1108148258',    // whatever is "now"
				linkusername='username',
				linkuserid='1',                   // my userid
				linkmoderate='0',
				linkmoddate='0',
				linkreviewfreq='0'", $link_id);
			if ($result3==1)
				echo "$idx_count, $query_data[3], $query_data[4], $query_data[5]<br><hr><br>";
			else
				echo "<h1>$idx_count - $query_data[3] - ERROR</h1>";
	}
}
mysql_close($link_id);				
?>
Hope this is useful to somebody.

Attached are FROM (the original news/links database) and TO (Links 1.51) screen caps.
Reply With Quote
  #835  
Old 02-12-2005, 06:44 PM
Imperial Fritz Imperial Fritz is offline
 
Join Date: Dec 2003
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I noted earlier that mass move of links to a different category or mass change of permissions would be very welcome, is there any hope of seeing this in the future?
Reply With Quote
  #836  
Old 02-13-2005, 04:04 AM
AndrewD AndrewD is offline
 
Join Date: Jul 2002
Location: Scotland
Posts: 3,486
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Imperial Fritz
I noted earlier that mass move of links to a different category or mass change of permissions would be very welcome, is there any hope of seeing this in the future?
Mass change of permissions is already coded for release in v1.55; I missed the request for mass move, but will give that some thought.
Reply With Quote
  #837  
Old 02-13-2005, 01:25 PM
Zain Jaffer Zain Jaffer is offline
 
Join Date: Sep 2004
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a simple question

How can I remove the image on the section place.

For example on a HD links database I run: http://www.juicyduff.com/forum/local...=links&catid=2

The avatar at the top messes things up and I don't want it to be there, how would I make it NOT display there?

"Avatars [img(removethis)]http://www.juicyduff.com/dloadz/avatars/wellysm/2.gif[/img(removethis)]" - Also, that displays on the title at the top near forum navigation ... I want that removed too.

BTW - AWESOME HACK!
Reply With Quote
  #838  
Old 02-13-2005, 06:24 PM
AndrewD AndrewD is offline
 
Join Date: Jul 2002
Location: Scotland
Posts: 3,486
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zain Jaffer
I have a simple question

How can I remove the image on the section place.

For example on a HD links database I run: http://www.juicyduff.com/forum/local...=links&catid=2

The avatar at the top messes things up and I don't want it to be there, how would I make it NOT display there?

"Avatars [img(removethis)]http://www.juicyduff.com/dloadz/avatars/wellysm/2.gif[/img(removethis)]" - Also, that displays on the title at the top near forum navigation ... I want that removed too.

BTW - AWESOME HACK!
Thanks.

Put your image tag into the category description (if you want it to appear in the category listings) or into the extended description (if you want it to show up only in the category itself). Don't put it into the category name.
Reply With Quote
  #839  
Old 02-13-2005, 09:45 PM
Zain Jaffer Zain Jaffer is offline
 
Join Date: Sep 2004
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Andrew,

Perhaps I was too vague and should make myself more clear:

Sorry, but the 2 solutions failed to solve the problem:

Bascically, I want the avatar to remain where it is on the front page but its image NOT be displayed how it is in the link above but to remain where it is.

Here is the main page: http://www.juicyduff.com/forum/local_links.php

You can see that the "wallpapers" images is moved, basically I only want the thumbnails to be on the left handside (category) and no where else.

Thanks, your help is appreciated...
Reply With Quote
  #840  
Old 02-14-2005, 04:29 AM
AndrewD AndrewD is offline
 
Join Date: Jul 2002
Location: Scotland
Posts: 3,486
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zain Jaffer
Hi Andrew,

Perhaps I was too vague and should make myself more clear:

Sorry, but the 2 solutions failed to solve the problem:

Bascically, I want the avatar to remain where it is on the front page but its image NOT be displayed how it is in the link above but to remain where it is.

Here is the main page: http://www.juicyduff.com/forum/local_links.php

You can see that the "wallpapers" images is moved, basically I only want the thumbnails to be on the left handside (category) and no where else.

Thanks, your help is appreciated...
Then you will have to edit a couple of the templates, links_main and links_catbit. links_main is the one that gives you the category title near the top of the page and links_catbit gives you the listing of categories within a page. There are three bits of information that you play with: the category name, its description and its extended description.

As you observe, if you put an image tag (or any other tag) into the category name, then the tag also shows up in the navigation bar as text. (I'll see if I can check for that condition and remove it, but I need to be careful that I don't kill anything else in the process.)

What you could do (easier if you are the only person creating categories on your board) is use the description or its extended description purely to hold the bbcode image tage, and modify the template accordingly.

For example. you could use the description to hold only the image tag and put the accompanying text into the extended description. So, you might edit these lines in the links_main template:

Code:
<tr align="center">
	<td class="tcat" align="center"><strong>$viewcatname</strong>
	<if condition="$catclosed != 0"><span class="smallfont">[closed]</span></if>
	</td>
</tr><tr>
	<td class="alt1"><span class="smallfont">$viewcattext</span></td>
</tr></tbody>
replacing $viewcatname by $viewcatdesc $viewcatname

You would also have to make a similar change in the links_catbit template, where the three variables are $catname, $catdesc amd $cattext.

Code:
<tr valign="top">
<td class="alt$catstyle">
<span class="smallfont">
<if condition="$catnew">
<b>
</if>
<a href="local_links.php?action=links&amp;catid=$catid">$catname</a>
<if condition="$catnew">
</b>
</if>
</span>
</td>
<td class="alt$catstyle">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td width="75%">
<span class="smallfont">
<if condition="$catnew">
<b>
</if>
$catdesc
<if condition="$catnew">
</b> (new entry $catdate)
</if>
<if condition="$links_permissions[can_edit_category]">
<a href="local_links.php?action=editcat&amp;catid=$catid">[edit]</a>
</if>
<if condition="$subcatnames"><br /><strong>Sub-categories:</strong> $subcatnames</if>
</span>
</td>
<td class="alt$catstyle" width="25%" align="right">
<span class="smallfont">
<if condition="$links_defaults[count_depth]==0">
[$catsub categ/$catentry entries]
<else />
[$catchildentry entries]
</if>
</span>
</td>
</tr>
</table>
</td>
</tr>
Good luck
Reply With Quote
  #841  
Old 02-14-2005, 10:32 AM
Zain Jaffer Zain Jaffer is offline
 
Join Date: Sep 2004
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unfortunately that didn't work
Reply With Quote
Reply


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 04:37 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06354 seconds
  • Memory Usage 2,338KB
  • 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
  • (3)bbcode_code
  • (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
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (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