UBB.Dev
Posted By: JoshPet TLD 7.2 - Link Directory - 08/08/2007 6:34 AM
This is originally Fishtails TLD Link Directory Addon, so I take no credit for the scripts. All credit and rights go to fishtails. I simply "wrapped" the scripts to function within UBB7 so that anyone who used this mod in the past, can add it again, and presuming you still have your old links tables, all your old links will still be there.

To Install
images - goes in images/links
scripts - go in /scripts directory
templates - go in /templates/default directory

Once installed, you can add a link to your menubar for /ubbthreads.php?ubb=links for a link to the Link Directory.
If you are installing for the first time, you can click the "Admin" link at the bottom of the link directory area and create the tables.

If you had this installed under the older version of UBB.Threads (6 series) then it presumes your w3t_links_links, w3t_links_categories, and w3t_links_favorites are still present in your database, and still have the w3t_ table prefix.

If the table prefix is different, then you'll see a spot in each of the 3 scripts to edit this:
$config['tbprefix'] = "w3t_";

Author - Fishtails - http://www.fish-tails.net
Updated by - Joshua Pettit - http://www.JoshuaPettit.com
Credits - Rick Baker, Gardener, Raconteur and ThreadsDev.com

Working Under - UBB.Threads Version 7.2


Description: The Link Directory - TLD v. 7.2
Attached File
2462-TLD7.2.zip  (60 downloads)
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 08/08/2007 5:23 PM
Thank you Josh, very appreciated thumbsup
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 08/08/2007 5:39 PM
Hey Josh, there were a good number of mac files in there (ds store, etc.). I removed them and uploaded the replacement zip. If I broke something, let me know smile
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 08/08/2007 5:49 PM
When accessing it the first time I am getting:

Script:
Line#:
SQL Error: Table 'threads.w3t_links_links' doesn't exist
SQL Error #: 1146
Query: SELECT lid,cat_id FROM w3t_links_links WHERE approved = '1'

I don't have it installed from the old version, so I don't have tables created yet.
Posted By: Stephen G Re: TLD 7.2 - Link Directory - 08/08/2007 11:12 PM
Same error here

frown
Posted By: blaaskaak Re: TLD 7.2 - Link Directory - 08/09/2007 12:29 AM
Same here, and http://themepark.nl/ubb/ubbthreads.php?ubb=links_admin&op=create_tables doesn't work also.

The queries in the script are wrong also, atleast I had to rework them manually to be able to create the databases.

For those who want to play, I executed this in phpmyadmin (I did change the table prefix to ubbt_:

Code
			CREATE TABLE ubbt_links_links
(
lid int(11) NOT NULL auto_increment,
cat_id int(11) default NULL,
approved tinyint(4) NOT NULL default '1',
title varchar(100) NOT NULL default '',
url varchar(100) NOT NULL default '',
description text NOT NULL,
date_added int(11) unsigned NOT NULL default '0',
name varchar(100) NOT NULL default '',
email varchar(100) NOT NULL default '',
hits int(11) NOT NULL default '0',
user_number int( 11 ) NOT NULL default '0',
member char(2) NOT NULL default '',
linkratingsummary double(6,4) NOT NULL default '0.0000',
totalvotes int(11) NOT NULL default '0',
PRIMARY KEY (lid)
)


CREATE TABLE ubbt_links_categories
(

cat_id int(11) NOT NULL auto_increment,
parent_id int(11) default NULL,
title varchar(50) NOT NULL default '',
cat_desc varchar(60) default NULL,
cat_order tinyint(10) NOT NULL default '0',
PRIMARY KEY (cat_id)
)


CREATE TABLE ubbt_links_favorites
(
num int(9) unsigned NOT NULL auto_increment,
lid int(9) unsigned NOT NULL default '0',
uid int(9) unsigned NOT NULL default '0',
PRIMARY KEY (num),
KEY FAV_indx1 (uid)
)
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 08/09/2007 5:50 AM
hmmm...

/ubbthreads.php/ubb/links/op/links_admin

doesn't throw an error, but it doesn't do much either crazy
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 08/09/2007 5:56 AM
hmmmm, a good part of the issue is we didn't get a language file, so there's no text smile
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 08/09/2007 6:03 AM
language file added to original zip above.
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 08/09/2007 6:30 AM
Was this based off tld 1.5 or 2.1? Some things like the search function we added and some bug fixes look to be missing crazy
Posted By: JoshPet Re: TLD 7.2 - Link Directory - 08/09/2007 7:25 AM
Thanks AA. This was based off whatever my client was running - which in looking now, I see was 1.5. I assumed it was the latest - but guess not. Doah. Good catch on the language file.
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 08/09/2007 7:50 AM
ok, thanks. There were quite a few changes by you, myself, omegatron, ekempter, gardner, id242 and a few others between Mark's release in may '03 and our last one in 12/05 - some were to just update to work with the different 6-series threads, others were to fix a lotta bugs and add some nice features. I may look at it at some point. If I do I need to write an importer for the old classic links script, it imported from the OLD gossamer threads links script smile
Posted By: Carte Blanche Re: TLD 7.2 - Link Directory - 09/06/2007 1:57 PM
Ok...so...er...what's the mod do?
Posted By: Gizmo Re: TLD 7.2 - Link Directory - 09/06/2007 5:14 PM
Think DMOZ, but for your UBB (if you don't know what DMOZ is, google it)
Posted By: blaaskaak Re: TLD 7.2 - Link Directory - 09/06/2007 9:36 PM
Originally Posted by Gizmo
(if you don't know what DMOZ is, google it)


what's google? wink
Posted By: Gizmo Re: TLD 7.2 - Link Directory - 09/07/2007 1:44 AM
If you don't know what Google is, you've obviously been living under a Rock, so yahoo it...

If you don't know what yahoo is, you're obviously highly handicapped and should ask your parental guardian to smack you in the head and how to live life online wink... lol
Posted By: blaaskaak Re: TLD 7.2 - Link Directory - 09/07/2007 9:48 AM
I'll settle for the smack on the head and live happely after smile
Posted By: Gizmo Re: TLD 7.2 - Link Directory - 09/07/2007 10:16 AM
Happily ever after? so you discovered the booze cabinet in the admin lounge? :x
Posted By: Zarzal Re: TLD 7.2 - Link Directory - 09/17/2007 4:22 PM
works very well, thank you!
Posted By: Stephen G Re: TLD 7.2 - Link Directory - 09/17/2007 8:59 PM
I couldn't get it to work with 7.2

frown
Posted By: Zarzal Re: TLD 7.2 - Link Directory - 09/17/2007 9:22 PM
There are 2 little bugs in links.inc.php:

line 141 and line 1167 contains a double }
change it to a single }

what the first }} do .. I dont now but the second break the breadcrumb link

The same problem in links_admin.php on line 805 and links_redirect.php line 157
Posted By: Stephen G Re: TLD 7.2 - Link Directory - 09/17/2007 10:54 PM
I tried running Blasskaaks query

Code
CREATE TABLE ubbt_links_links
(
lid int(11) NOT NULL auto_increment,
cat_id int(11) default NULL,
approved tinyint(4) NOT NULL default '1',
title varchar(100) NOT NULL default '',
url varchar(100) NOT NULL default '',
description text NOT NULL,
date_added int(11) unsigned NOT NULL default '0',
name varchar(100) NOT NULL default '',
email varchar(100) NOT NULL default '',
hits int(11) NOT NULL default '0',
user_number int( 11 ) NOT NULL default '0',
member char(2) NOT NULL default '',
linkratingsummary double(6,4) NOT NULL default '0.0000',
totalvotes int(11) NOT NULL default '0',
PRIMARY KEY (lid)
)


CREATE TABLE ubbt_links_categories
(

cat_id int(11) NOT NULL auto_increment,
parent_id int(11) default NULL,
title varchar(50) NOT NULL default '',
cat_desc varchar(60) default NULL,
cat_order tinyint(10) NOT NULL default '0',
PRIMARY KEY (cat_id)
)


CREATE TABLE ubbt_links_favorites
(
num int(9) unsigned NOT NULL auto_increment,
lid int(9) unsigned NOT NULL default '0',
uid int(9) unsigned NOT NULL default '0',
PRIMARY KEY (num),
KEY FAV_indx1 (uid)
)

to create the table - as I get this:

We encountered a problem. The reason reported was

Script:
Line#:
SQL Error: Table 'galactiF.ubbt_links_links' doesn't exist
SQL Error #: 1146
Query: SELECT lid,cat_id FROM ubbt_links_links WHERE approved = '1'


but it says :

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE ubbt_links_categories
Posted By: Stephen G Re: TLD 7.2 - Link Directory - 09/24/2007 10:02 PM
Anyone know what I'm doing wrong to get this error ? I REALLY want to get this working.

smile
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 09/25/2007 6:54 AM
Originally Posted by Zarzal
There are 2 little bugs in links.inc.php:


If I remember right there's a good number of little bugs here and there in the code this is based on. If I ever get time I'll look at updating it.
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 09/25/2007 6:55 AM
Originally Posted by GEN
Anyone know what I'm doing wrong to get this error ? I REALLY want to get this working.

smile


?? What platform are you running on?
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 09/25/2007 7:06 AM
It looks like you didn't create all the tables, or they are of a different prefix
Posted By: Stephen G Re: TLD 7.2 - Link Directory - 09/25/2007 7:18 PM
Oh, the prefix is the same.

It's just every time I run the query to create the tables it doesn't do it in phpMyAdmin
Posted By: mikey81 Re: TLD 7.2 - Link Directory - 09/25/2007 8:21 PM
I have allmost the same problem. Centos 5.0 latest mysql.

SQL-query:

CREATE TABLE ubbt_links_links(

lid int( 11 ) NOT NULL AUTO_INCREMENT ,
cat_id int( 11 ) default NULL ,
approved tinyint( 4 ) NOT NULL default '1',
title varchar( 100 ) NOT NULL default '',
url varchar( 100 ) NOT NULL default '',
description text NOT NULL ,
date_added int( 11 ) unsigned NOT NULL default '0',
name varchar( 100 ) NOT NULL default '',
email varchar( 100 ) NOT NULL default '',
hits int( 11 ) NOT NULL default '0',
user_number int( 11 ) NOT NULL default '0',
memberchar( 2 ) NOT NULL default '',
linkratingsummary double( 6, 4 ) NOT NULL default '0.0000',
totalvotes int( 11 ) NOT NULL default '0',
PRIMARY KEY ( lid )
) CREATE TABLE ubbt_links_categories(
cat_id int( 11 ) NOT NULL AUTO_INCREMENT ,
parent_id int( 11 ) default NULL ,
title varchar( 50 ) NOT NULL default '',
cat_desc varchar( 60 ) default NULL ,
cat_order tinyint( 10 ) NOT NULL default '0',
PRIMARY KEY ( cat_id )
) CREATE TABLE ubbt_links_favorites(
num int( 9 ) unsigned NOT NULL AUTO_INCREMENT ,
lid int( 9 ) unsigned NOT NULL default '0',
uid int( 9 ) unsigned NOT NULL default '0',
PRIMARY KEY ( num ) ,
KEY FAV_indx1( uid )
)

MySQL retourneerde:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE ubbt_links_categories
(

cat_id int(11) NOT NULL auto_inc' at line 21

Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 09/25/2007 10:13 PM
Can you try running each create table on its own and see which one it chokes on?
Posted By: blaaskaak Re: TLD 7.2 - Link Directory - 09/25/2007 10:30 PM
Originally Posted by AllenAyres
It looks like you didn't create all the tables, or they are of a different prefix


I did rename the w3t prefix to ubbt, I also updated the code itselve to use that new prefix.
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 09/26/2007 12:37 AM
Are you having the same problems? Did anyone get it to install correctly?
Posted By: blaaskaak Re: TLD 7.2 - Link Directory - 09/26/2007 12:39 AM
I got to install correctly...

I changed the default prefix to ubbt_
created the tables manually
Posted By: mikey81 Re: TLD 7.2 - Link Directory - 09/26/2007 10:00 AM
Originally Posted by AllenAyres
Can you try running each create table on its own and see which one it chokes on?

Seperately the tables create with no problems!?!
Posted By: Stephen G Re: TLD 7.2 - Link Directory - 09/26/2007 10:20 AM
Same here.

Now all I need to do is get some of the display issues sorted.
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 09/26/2007 2:49 PM
Good, if I get time I'll look at it later this week, it really needs a few issues worked out smile
Posted By: Stephen G Re: TLD 7.2 - Link Directory - 09/26/2007 3:16 PM
smile
Posted By: blaaskaak Re: TLD 7.2 - Link Directory - 09/26/2007 5:20 PM
Great to hear Allen!

We are kinda planning on using this, but I held it back a little after hearing about the problems in it.
Posted By: Zarzal Re: TLD 7.2 - Link Directory - 09/26/2007 10:39 PM
I use my old tables so I dont run the create process
Posted By: Micky Re: TLD 7.2 - Link Directory - 09/29/2007 3:18 AM
Hi,
if one the Line

$config['tbprefix'] = "ubbt_"; // The Prefix to the Links tables

in the files links.inc.php, links_admin.inc.php, links_redirect.inc.php by

$config['tbprefix'] = "{$config['TABLE_PREFIX']}"; // The Prefix to the Links tables

substituted, one does not need before the installation only the files with the right Prefix edit. smile
Posted By: Zarzal Re: TLD 7.2 - Link Directory - 02/17/2008 1:32 PM
Has someone test this under V7.3b4?
Posted By: Micky Re: TLD 7.2 - Link Directory - 02/17/2008 8:16 PM
Runs with me in the forum.
Posted By: Zarzal Re: TLD 7.2 - Link Directory - 02/18/2008 1:29 AM
one problem gone on my checklist, thanks for testing.
Posted By: Zarzal Re: TLD 7.2 - Link Directory - 05/18/2008 4:38 PM
I take a closer look to TLD running under UBB.threads 7.3
I found some layout problems if you use sidebars. I try to fix it and here you can download my fix. I split the template in links and links_admin.

Attached File
links.zip  (4 downloads)
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 06/11/2008 6:23 PM
Thank you Zarzal smile

I am making some headway in updating this to use more of 7.3's features (like SEO cats and links) and completely 'wordletizing' it. It will be a few days before I have it completed for testing tho... headed to Austin shortly and I need to get some work done here smile

You can see some of the progress here:

http://www.praisecafe.org/forum/ubbthreads.php/ubb/links

At that point we need to see about putting some of the features we had added for 2.2-2.5 back that were skipped in the update to 7.x crazy
Posted By: Zarzal Re: TLD 7.2 - Link Directory - 06/11/2008 8:24 PM
This looks nice. I still wait for the final release.
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 06/13/2008 6:53 AM
hmmm...


I take it no-one has actually run this script? If so, are you able to actually add links?

When I submit the script to add the link it refreshes the page back to the submit link page - this time with all fields blank *except* now the title you added for the previously submitted site is now sitting in the category box.

smash

Not counting the install bug (it won't install without creating the tables manually), this is still pretty buggy. Will need some more work before it's ready for public use.
Posted By: Zarzal Re: TLD 7.2 - Link Directory - 06/13/2008 8:42 PM
add a link an my page or on your page? On my website it works fine.
/update: on your page i get a blank screen if I try and the url looks misformed:
http://www.praisecafe.org/forum/ubbthreads.php/ubb/links/op/Submit_Link/cat_id/.html
I dont use the 'add .html' option on my board.
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 06/13/2008 10:32 PM
Zarzal, do you mind attaching the links.inc.php file you are using? I am having a few issues with the submission. And if you can, can you see about turning on the .html option just for a minute to test adding one site to see if that's the issue? Turning the .html extension off didn't fix the issue on my site.
Posted By: Zarzal Re: TLD 7.2 - Link Directory - 06/13/2008 10:46 PM
I will watch my board and if I see a timeslot with less user I will test it.
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 06/13/2008 10:52 PM
Danke, and when you get a chance, please attach the links.inc file, if you give it a .txt extension you should be able to attach it fine. smile
Posted By: Zarzal Re: TLD 7.2 - Link Directory - 06/13/2008 11:40 PM
here we go:

Attached File
links.inc.php.txt  (5 downloads)
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 06/14/2008 5:36 AM
Thank you - I get the same problem like I mentioned before. I am using mysql and php 5+. I have no idea what the problem might be. If you look at the form for submitting the info there's something odd going on with the categories, there's several options in there for categories. I'm going to work on it and see if I can get it cleaned up.
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 06/14/2008 6:21 AM
Looking at this line:



When I view source from the web page it's getting an empty value:



This line:



I get an empty value for $cat_id and $title:



Not sure what's going on...
Posted By: Zarzal Re: TLD 7.2 - Link Directory - 06/14/2008 11:08 AM
Do you ran any kind of security plugins on your websever? ModSecurity?
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 06/15/2008 10:35 PM
No, but I am running php 5.1.x - I wonder if this isn't up to php 5.1's coding standards...
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 06/15/2008 10:54 PM
Part of the issue is "title" is used for the name of the site being submitted and the name of the category being submitted to. Need to update them to cat_title and url_title.
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 06/16/2008 6:17 AM
OK, found the issue. Working on wordlets right now.
Posted By: Zarzal Re: TLD 7.2 - Link Directory - 06/16/2008 7:45 AM
I test the .html extension on my site nd it work. Spider frindly urls too.
Posted By: Deejay23 Re: TLD 7.2 - Link Directory - 01/25/2009 5:38 AM
Hmmm i just installed this, manually put in the tables as noted on the past posts, and it worked. Awesome... I dont notice any issues yet. Running version 7.1 threads still though. frown but at least this is working now for our site.

I loved this mod years ago, and so glad to have it back again! Thanks for all your work on this guys!
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 01/25/2009 5:56 AM
Glad you like it, it should work pretty well for all 7.x series, I believe.
Posted By: Zarzal Re: TLD 7.2 - Link Directory - 02/24/2009 10:53 PM
I just encounter a little problem on my site. My mods seems not to be able to click the green LED to edit a link in the DB. They get a message that they must be admin to do this. I cannot find the check. I guess I must just change a little thing to allow mods to edit the links.

Can anyone assist me in this case?
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 02/25/2009 2:15 AM
Do you have a link to it Zarzal?
Posted By: Zarzal Re: TLD 7.2 - Link Directory - 02/25/2009 1:10 PM
Link to what? The Link DB? http://www.dragonclan-forum.de/board/ubbthreads.php?ubb=links

But the link dont help you because you are not a mod smile If you register I can change it if you like.

I guess its a missing compare of the rights. it must be administratos && moderatrors or something like this.

In links.inc starting line 109 I found this:
Code
// Set links admin link
if (($user['USER_MEMBERSHIP_LEVEL'] != 'Administrator') && ($user['USER_MEMBERSHIP_LEVEL'] != 'Moderator')) {
$links_admin_delete_link = ""; // Don't give option to delete a link
}
else {
$links_admin_link = "   *  <a href=\"{$config['BASE_URL']}/ubbthreads.php?ubb=links_admin&op=links_admin\">{$ubbt_lang['LINKS_ADMIN']}</a>"; // Provide a link to the links admin
$links_admin_delete_link = "  *  <a href=\"{$config['BASE_URL']}/ubbthreads.php?ubb=links_admin&op=delete_link&lid={$row[lid]}\">{$ubbt_lang['LINKS_ADMIN_DELETE']}</a>   ";
}
I wonder why this dont work
Posted By: Zarzal Re: TLD 7.2 - Link Directory - 02/25/2009 1:18 PM
ahhh, found it. wrong settings in links_admin.inc.php smile I change the permissions in top of the file and all work as it should.
Posted By: badfrog Re: TLD 7.2 - Link Directory - 10/04/2009 11:49 PM
is there a updated download of this with all the compiled fixes etc?

has anyone used if on UBB 7.5.3 ?

does anyone have a link to where I can see this in action?
Posted By: Ruben Rocha Re: TLD 7.2 - Link Directory - 10/05/2009 12:18 AM
I believe Fishtails has it on his site still. It is kinda hidden if not registered.
But you can see it at
http://www.firstcoastangler.com/forum/ubbthreads.php?ubb=links
Matter of fact try this topic HERE
It is a more current topic and it has a demo link that is more active.
I just noticed fishtails is using this version(ubb links) in lieu of the tld flavor
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 10/05/2009 6:56 AM
The first post in the topic Ruben linked to should contain current code and there's no reason it shouldn't work on current versions.

"fishtails" most likely has an oooooooollllldlddd version (pre-this version).
Posted By: badfrog Re: TLD 7.2 - Link Directory - 10/05/2009 3:01 PM
thanx allen, will check it out this evening

have all the SQL issues been sorted out? or do I still need to manually create the various tables, etc?
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 10/05/2009 4:22 PM
It's an automagic install, there should be instructions in the first post.
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 10/05/2009 4:23 PM
Oh, and the demo forum it links to is running current ubb.threads code. smile
Posted By: Ruben Rocha Re: TLD 7.2 - Link Directory - 10/05/2009 11:35 PM
Okay Allen I am confused now.
What Mod is really the most current. ubb links or this tld version
I can't find a demo link on this post. At least not the topic start post.
Posted By: AllenAyres Re: TLD 7.2 - Link Directory - 10/05/2009 11:53 PM
The other one is much more current, Josh based this version off the fishtails version and missed out on quite a bit of the updates - plus this one states it's for threads 7.2, the other is for 7.3+
Posted By: Ruben Rocha Re: TLD 7.2 - Link Directory - 10/05/2009 11:59 PM
Okay thanks. I thought I was confused but I guess not now.
© UBB.Developers