UBB.Dev
Edit Note: I updated the file to reflect Omegatrons html corrections. Thanks Chuck.

Sorry it took so long. Note: Language files are not complete for this release.

BETA Version 2 - New Features:

Search Links - search in/for links
Popular Links - based on number of hits - admin chooses how many hits before becoming popular
Newest Links - Admin chooses number of links to display on latest links page
Ratings and top rated - allow member only or anyone to rate a script. Top Rated views - admin chooses number to display
My Favorites - members 'bookmark' links from the database in their Favorite Links
Admin receives email when link is submitted
Admin submissions are automatically approved
After submission a link to add another is provided
Categories may be edited
Main categories may be sorted in the order you want
Instructions and Configuration:

Open links.php in a text editor of your choice. Note pad does just fine. On or around line 38 find the following variables and set the the way you want:

// Define a few config variables

$CatColumns = 4; // number of columns for category display from 1 to infinity / suggested number is 4
$AllowAnon = 'yes'; // allow anonymous to suggest links? yes or no
$popular = 10; // how many hits before a site is considered popular
$newest_links = 10; // how many new links to display in most recent links

Once you have these defined, upload the files to your Ubbthreads directory. BACK UP your files and database. ( If you are upgrading from v1.o, it is suggested that you delete all TLD v1.0 files and upload the new ones. There are numerous changes and new files, as well as some files (a few template files) have been deleted. The database has also changed. )
Add a link to your menu to go to http://yourdomain.com/your_threads_install/links.php . Be sure you are logged in as admin. There will be a link to the links admin script. When clicked on you will find links to either upgrade from Beta 1.0 or new install. Click the appropriate link. If everything goes well, you are now ready to create categories and add links. That's it. Any problems, bugs found or fixed, or suggestions please use this thread. Thanks.

Basically, the sequence of adding links is as follows.

Admin creates a category
A user browses to the category he/she wishes to add their link and clicks the Submit Link button from that category.
When the user submits the link, the script will check to make sure that the form is filled out completely, that the email address is of the correct format, that the url is of the correct format, and validates the url to make sure it is not a dead link. If everything is OK, then the link is entered into the database (but can not be seen in the links directory yet), otherwise the submitter gets an error message.
After the link has been submitted, the admin has to approve the submission. The Admin can check the link for appropriate content for their link content requirements / rules, if any.
The admin adds the link, edits the link or deletes it from the database.
Users can now see the link in the directory if it was added.


Enjoy TLD, and please report bugs or problems in this thread, as well as any suggestions or comments. Thanks. The other TLD thread may be locked or deleted.

Mark

Note:

Versions:
(v1.5 - released 5/26/2003) - Original release by Mark
(v1.8 - released 8/23/2004) - Updated release with bugfixes and features added by ekempter
(v1.8.1 - released 10/10/2004) - Updated release with bugfixes for 6.5 by josh
(v1.8.3 - released 07/20/2005) - a few small bugfixes
(v2 - released 08/01/2005) - search function added by ekempter + a few small bugfixes
(v2.1 - Released 12/04/2005) - updated to work with 6.5.2 and a few small bugfixes

Attached File
81980-links15.zip  (516 downloads)
http://www.viperalley.com/links.php?op=Links

Added it here.

Noticed that when you click SUBMIT LINK it doesnt pick up the category you are browing automatically. It's blank; previously it picked the category you were in.

Other than that, so far so good.



will give this a shot
I got it up and going also. This is a great addition and just in time as the members of my site were requesting a links page

Check it out: www.socaps.com/ubbthreads/links.php
Mark,

Great Work by the way now on to the issue.


Okay I use tablewrappers on my site so it is real easy for me to see HTML issues and errors. I have reworked all the files with the proper HTML table close etc etc. There were some stray and missing tags no biggy. If you look at the files you will probally smack yourself in the head going why did I do that. I love it man this is a great addition way better than the beta 1.0 version. Anyway the version above will fix all problems and I went through and changed all <B> tags to <b> for XHTML compliance so you will validate. I may have missed a validation issue here or there but your good to go.

Attached File
81992-Links15.ZIP  (428 downloads)
I knew there were going to be some html issues, but I've been so slow getting this out I wanted to at least get a beta out with all the new features so y'all would know where I was at with it. Also, if I was going in the wrong direction, I didn't want to get too far ahead of myself and then have to go back and re-work a lot of stuff. Chuck, is the only thing you changed html? I haven't downloaded it to check it out yet 'cause we just got back from the beach and we're in the middle of a pool party/picnic.

Did anyone have any problems with the install or upgrade? I think the My Favorites will fit right in with the new My Home that PhotoPost has made up. Just a matter of making the calls. Which reminds me, I am planning on implementing a little addition to the My Favorites. Basically, what I am looking at is members can add links from the TLD to their favorites, but let's say they want to add some personal links to their favorites that don't belong in the TLD categories provided by the site admin. Follow where I'm going with this? A member clicks the add to favorites link from TLD, but he's got a couple of personal links he/she wants to add to their list. Bingo, bango, they can add their own link to their favorites, and doesn't disrupt the actual TLD links? If I am confusing please let me know. Sometimes I confuse myself.

Back to the party.....................
I made a slight change there. I set it so that regardless of which category you were in, you can select the category for which you want to add your link. Is this bad? Should I go back to the old way? Looking for suggestions. I figured it was better this way, but then, what do I know?!
Mark,

All I did is fix all HTML issues so it would display right. Funny thing about html is alot of times those stray tags do not affect alot of people it can view fine. You had an extra table tag in the close template as an example.

Alot of files you opened with <table> and closed with $tbclose which adds extra tags. No need for tbclose there so I changed to table. You already pull the wrappers with your head and close templates. Little things like that. With the tablewrappers on my site it picks up on errors like that. No CODE was touched just HTML. Great work I am loving what ya did.
Mark,

I think it is best to default the drop down to the current category.

I think the My Favorites would make a great addition to My Home; I'll have to take a look and see how to do that.
This sounds just fantastic, I will make a trial installation of it for sure, I'll let you know how it works out.
You might also want to change each .php?op= into .php?Cat=$Cat&op= so that categories are carried through from and back to threads

This is really looking very good.
Will upload tomorrow
Mark,

Not that I see this meantioned but little buglet that I see. I submitted a link and it does what it was suppose to. It told me that the link was submitted for approval. I even got the email saying there was a link to approve ( great addition ) However when I went to admin section to approve it it was not there. The link goes through all this and is submits live no approval needed. Now it would be nice if it worked like this intentionally. Maybe a toggle switch in admin section or hard coded like the 4 other variable you added to allow approval in admin section or send straight to categories for display.
Hi Chuck,

Admin & moderator links are automatically approved - the toggle for this is links_submit_form.php at the top
Chuck, as Ian states, the submission is working as intended. If you are loged in as admin or moderator, no need for approval. It is automatically approved. I just forgot to change it to not send email etc. Still needs some work, but it does seem fairly stable, would you agree?
Because of the HTML Errors this is not working with the sidebar Hack.

Take a look at this:
http://www.clanforums.com/ubbthreads/links.php?op=Links
This is correct but then try to use a link
Top Rated for example:
http://www.clanforums.com/ubbthreads/links.php?op=Top_Rated_Links

If you're logged in and you've the sidebar turned on the script is not working.

I am sure that this is only a small template problem. I will take a look into it later today...

Does it work okay if the sidebar pal is on the left?

Mine is workign fine, lke that, but have noticed a problem with it on the right - but I do not think it is related to TLD
Omegatron has done a lot of html fixes on this release. H has them posted here. https://www.ubbdev.com/forum/download.php?Number=81992 Try this out and see if it works with the side bar pal. I don't use the sidebar pal, so I can't test it.
BTW - my sidebarpal problem was not related to to TLD - however I am running Chuck's version.
Ok boys and girls, here's the solution to make fishtails great mod working if your using the sidebar hack on the right side.

Simply open links_footer.tmpl and change this
Code
<br /><? //UBBTREMARK<br />echo <<<UBBTPRINT<br /><br /></td><br /></tr><br />$tbclose<br /><br />UBBTPRINT;<br />/* UBBTREMARK */ ?><br />


to this

Code
<br /><? //UBBTREMARK<br />echo <<<UBBTPRINT<br /><br />$tbclose<br /><br />UBBTPRINT;<br />/* UBBTREMARK */ ?><br />


Life can be so easy sometimes :-)

Now I start to test the rest
danke for the code JL
JL,

You problem then lies in the sidebar templated not being right because those two closing tags are indeed correct and needed. The header template ends with <tr><td> so the
footer needs to have </td></tr>

Not sure which version I just uploaded, I think it was omegatron's On line #659, links_admin.php was:
Code
<br />print <p align="center"><br />


should be:

Code
<br />print "<p align=\"center\"><br />


https://www.ubbdev.com/forum/links.php

Thanks Allen yeah thats me looking at things too hard.

I went back in and was trying to get some more HTML error to XHTML validate things for Mark. Zip Updated.
I just updated the file attachment in the first post to reflect Chucks html corrections to alleviate any problems. Thanks Chuck.
No Problem Mark I appreciate all the time your taking making such a wonderful product.
yes, very nice... I've drooled for a mod like this for years
I'm glad y'all like it. Have any bugs other than the html been found? It appears at this point (based on none have been posted) that there aren't any. YAY! Of course, as soon as I post this I'll come back and there will be some. LOL
hehe.. I haven't checked, but will tonight
When someone posts a link, and you're in the link admin to approve, delete, or edit it...their username link does not work.
Mark one thing I noticed is the links_admin does not load. I don't think I touched any code just html. Would you see if you can see what the deal is.
I was checking our links page in the validator and was trying to find out why we're not getting the </body></html> tags. I haven't found the reason (it may be the retro stats killing it), but did find this:

At the bottom of show_cat.php there's this line:

include "links/templates/links_show_cat.tmpl";

there is no template file by that name. Is that a feature still coming?
links_header.tmpl on line # 15 needs amp; added to that &

line #27 needs a /

LOL Allen we seem to be doing the same. Here is a zip of almost XHTML Compliant. There is one thing left and I am scratching my head. The Favorites call to and emtpy body tag and no closing tag to td and tr but I have looked and looked and am at a lose. However this is the only known issue keeping this copy from being compliant. Look this over Allen and see if I am right.

Attached File
82558-Links.zip  (314 downloads)
sure, thanks
looks good to me so far

It appears the cut off </body></html> tags are related to either the sidebar or retro stats... time for more testing
Hmm that sounds like a good theory Allen however how does it only effect the favorites? Should that not affect the validation of all of them. I only get that with the favorites. That is the only file that calls the redirect so maybe the problem lies there. The rest of the script now validates although I do need to go through the links_admin.php and clean a few things up. Waiting on Mark to look at it and find out what is different from the initial release that worked and this release that does not.
Haven't checked the favorites

I'm talkin about the whole site in which the sidebar is a part... the 2 end tags are missing. Aside, I did manage to almost completely clean up the retrostats script code

http://validator.w3.org/check?uri=https://www.ubbdev.com/forum/links.php
Okay Got ya. Yeah I use my sidebar on the left

Understand. There seems to be that issue with the sidebar on the right.

I just switched the sidebar to the right and everything validates as well. Is your sidebar closing template this:

<? //UBBTREMARK

echo <<<UBBTPRINT

</td>
<td width="10">
 
</td>
<td align="center" valign="top" width="{$theme['sidebar_width']}">

UBBTPRINT;

include("$thispath/pals/sidebarpal.php");//UBBTREMARK

echo <<<UBBTPRINT

</td>
</tr>
</table>


UBBTPRINT;
/* UBBTREMARK */ ?>
Here's the error I get when clicking on the links admin link:

Parse error: parse error, unexpected '<' in /home/virtual/site2/fst/var/www/html/forum/links/links_admin.php on line 659
ah yes, add a " after

print

on that line
yes, works for me now

Code
 <br />print "<p align=\"center\"><font size=\"-2\"><b>TLD by <a href=\"http://www.fish-tails.net\">Fishtails</a></b></font></p>"; <br />


Thanx Allen always good to have two sets of eyes. Well the program is now 100% compliant with the one exception of the show favorites menu which calls the links_redirect.php script which makes the validator go wild calling all kinds of tag elements. It actually looks like main.inc.php is being called twice by the links program. Anyway this post here has the latest files with all the validated programs.

https://www.ubbdev.com/forum/download.php?Number=82558
Nice, thank you I'mma gonna add it to a site that's been requesting it now...
No problem you know me. With the tablewrappers and such on my site I can't afford to have a program with html mistakes as my site would look all wacky.

Everything should validate now except the favorites.

The offending line which points to the redirection script is this in show_favorites

print "
<a href="links/links_redirect.php?lid=$row[lid]&url=$row[url]" target="_blank">$row[title]</a><br />  $row[description]<br />
";
}

If you look at that file contents you can see it also calls the main.inc.php file but to my knowledge the links program already does this.

Here is the redirect file.

// --------------------------
// Update the total number of hits for a link.

require ("../main.inc.php");

$query = "UPDATE {$config['tbprefix']}links_links
SET hits = hits+1
WHERE lid = '$lid'
";
$update_hits = $dbh -> do_query($query);

header ("Location: $url");

I have tried taking out the require and the header location statement. Maybe someone will spot something obvious but I think the error looks to me like the main.inc being called twice.
Hmmm... strange that I have not had these errors - and I am running the side bar, and tested both on left & right. Maybe it is beacuse I run the links as root on the account and not in a sub-directory. Mine is at http://links.nonleague.com (Still testing things there, and not yet live )

One thing that was missing from the original version that I added to mine was Cat=$cat& on each URL so that categories are carried through from and back to threads

Of course I also added to authenticate U_Groups as I use the groups feature in my sidebar (I have to be different LOL)
Allen's sidebar issue seems to be with that particular hack or in combination of another hack as in the sidebar thread I already stated my site validates with the sidebar. Now the issue above with the show favorites is the only thing left with this program that keeps it from being 100$ validated although the program works as intended.

Now I logged into your site. The validator does not like your site at all. It can not even obtain doctype declarations from your domain. I would suspect though that the validator would find the same error if it could parse past those nice little subdomains.
Very true - but then I do not run the validator at all - must admit that I have not given any thought to validation. So much of the extra software I use is not validated, that I am onto a looser from the start. I was mroe refering to the various html errors.

Weird thing though I see you registered, and I had the email sent to me to verify your email address - despite the fact that your address was in the to section - strange.
Yeah well it worked fine. I recieved the confirmation email. Your links section is private so I had to register to view the link you posted. The club I joined is funny my daughter is a travel soccer player for the Abingdon Football Club. Then again thats abingdon over here in Maryland USA

Yeah I don't think you would ever know where to begin concerning validation however you talk about html error's validation ensures no html errors.
Good job you had a after that comment
Well you do love your subdomains. Seems that interrupts with the Threads DocType declaration or something else is.
I've got a site that when I try to add categories, it says something like 'you didn't type anything' Any ideas?
Suggestion, add an entry for the who's online so peeps can be seen peeping at the links
I wonder if this is a register global thing.

Allen - I haven't looked at this mod closely - but does the script that is saying "you didn't type anything" have a get_input call at the top for all the variables it's looking for. If not - it might see them as empty.
There's a
Code
<br />// Get the input<br />        $op        = get_input("op","get");<br />


toward the top of the file ( links_admin.php )
Not sure if all the other variables (like $title etc.... ) need to be included in that, if register globals is on (or off) I always get confused on which one needs the get_input function.
idda know... it works here
I'm thinking that the register globals is set differently on that server.

I'm guessing.
I haven'y been on a computer for days! Was begining to have withdrawals. Chuck, thanks for working on the html. I'm not having a problem with the admin script loading, but I'll take a gander at the file. The call to show_cats.tmpl is no longer needed. You can safely remove that line.

On my system, register globals is on, and everything works fine.

Today is 24 years of a great marriage, so forgive me if I don't look at it right away. I'll check it out in the am.
congratulations man
Mark I fixed the problem no worry looking for it.
Congrats!

Not sure where the problem might be... it makes me think it might be server setup if no-one else is having the same problems. I'll re-upload all files and try again
Yeah if you have access to a few different sites as Josh meantioned look into register globals. I would suspect that as the first suspect thus requiring the get variables to be defined more.

After I saw your problem I tried it and it works for me.
Yeah, you'd get that message when adding a category if ($title) is empty.

Allen you also might try adding

echo "Title: $title";

in the script somewhere and see if it has a value.
If not try adding

$title = get_input("title","post");

near the top with the other get_input function.
will do Josh, thanks
Okay, now I can create/add categories and subcategories, but when I attempt to submit a link, it says that the url is not valid or is temporarily unavailable. It tells me to click the link to check it, and when I do, the link works perfectly. Any suggestions?
Do you approve the links after they are submitted?
It wasn't showing them as being submitted. Don't know what the problem was but Nikos fixed it I guess.
It sounds like y'all found the problem and it was with register globals being off? I'll add that get_input() that Josh spoke of.

shortbus, I found out (at least most of the times) why some urls won't work even though they are good urls. Basically, it has to do with server redirects. Let me see if I can clarify this. If you put in, say http://www.fish-tails.net (note there is NO trailing slash) in the address bar of your browser (or just click the link) watch the address bar and it will add the trailing slash, which is the server basically redirecting you to the default directory. Now, if someones home page is not the default directory and is in effect in another directory, the script can not resolve the new location because it is expecting the exact url.

In either case, php will not allow (at least from waht I've found out) to follow the redirect, hence the url is returned false.

I haven't figured out how to overcome this, so if anybody knows, please speak up.

Well, I was just previewing this post, and noticed that the trailing slash was added for me, when I stated there was no trailing slash. It appears the answer may be before me without knowing it.
I am not a programmer, but can't a check loop be used? Would it be possible to check the URL the way it is now and if false append the slash and recheck, if still false then return the failed check screen.

I did a modification like that to script used (perl) to update a user file. I read the Users Name out of WWWthreads and modified it to be used as a directory level password. I checked and removed all non allowed characters if it failed the check.

Thanks for this script. I will eventually be switching over from Links 2.0 to this.

Good Luck,
Dale
This is great and I'm proud to say we've gone live with this here.

Suggestion for the approval page. Either a "approve all" link or radio buttons (like when we approve members).

It would be nice to zip down a list of links and approve them all.
WOW, I'm touched!!!!!!!!! Looks great with this new theme as well!!!!! Good suggestion on the radio buttons, Josh. I'll add that to the todo list. What I want to do for the next release is to squash some of the little critteres that are annoying, optimize some of the queries so there's not so many calls, and finish the language files for the general and admin area. Thanks to all who have contributed to the links directory.
We love it

Would be nice to delete categories tho
Posted By: Ian_W Re: TLD Bv1.5 Released - Threads Links Directory - 06/14/2003 12:14 AM
I've also added a bit to mine to sort the sub-categories on the order that they are entered, rather than alphabetical - would be cool to be able to sort the sub-categories manually, as one doesn't always need them in the default order
I want to thank you for this nice hack ! I installed it on my website www.inpiega.com and works perfectly.

I noticed that most of the text was not in the language files so I decided to contribute to this doing it myself, attacched to this message you'll find a version with all text in the language files (English and Italian avaiable) and a small modification: now user can edit or remove the links they added.

Here other suggestion:
  • All text in language files [Done, see attacched file];
  • Users should be able to edit their links [Done, see attacched file];
  • Categories should have a comment;
  • Administrator should be able to move a link;
  • Administrator should be able to delete categories;
  • To be able to use the search engine of the forum to search links in the link database ;
  • Could be good also changing the way categories works, not like folders as happen now but like... categories:
    Example:
    Green apples website: categories --> Colors | Furits
    In this way a site could appear in more than one category.


I hope I have done something useful.

Attached File
85025-links - edited.zip  (124 downloads)
Posted By: donJulio I can't seem to install this correctly - 06/19/2003 8:46 PM
I added the .zip file for this to my threads directory and unzipped it there. Links.php went into the threads directory while everything else wento into the new links directory. I went to the links.php page in my browser and got these SQL errors:
[] SQL ERROR: Unable to do_query: SELECT lid,cat_id FROM w3t_links_links WHERE approved = '1'
Table 'laondal_boards.w3t_links_links' doesn't exist
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/laondal/public_html/foros/links/links_show_cat.php on line 46
SQL ERROR: Unable to do_query: SELECT * FROM w3t_links_categories WHERE parent_id = '0' ORDER BY 'cat_order'
Table 'laondal_boards.w3t_links_categories' doesn't exist
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/laondal/public_html/foros/links/links_show_cat.php on line 66
There are () links in our database. [/]

I figured the database would have to be altered, but there weren't any new tables yet for the links directory. Then it occurred to be that it says in the instructions to click on "Links Admin" to do the install (which explains why there are no tables). So I did that and I got this error:

[] Parse error: parse error, unexpected '<' in /home/laondal/public_html/foros/links/links_admin.php on line 659 [/]

Ok. So what do I need to do to fix these problems so I can install the links directory?
I'm getting that parse error as well now...

-peter
Posted By: omegatron Re: I can't seem to install this correctly - 06/24/2003 4:25 AM
Thats easy fix Line 659 of Links_Admin looks like it is missing a "

Your file reads this

print <p align="center"><font size="-2"><b>TLD by <a href="http://www.fish-tails.net">Fishtails</a></b></font></p>";

I double checked my working copy and it should be this

print "<p align="center"><font size="-2"><b>TLD by <a href="http://www.fish-tails.net">Fishtails</a></b></font></p>";
Posted By: shortbus fish.... - 06/24/2003 4:32 AM
did you guys figure out a rememedy to the redirect or whatever the problem was with the / or whatever?

Still having trouble. Thanks.
Posted By: msula Re: I can't seem to install this correctly - 06/24/2003 4:34 AM
I just installed this today, and you have to fix what chuck pointed out.. but also, when going to the links.php file as per the instructions, it would give SQL errors because the tables weren't created.

It should have asked you whether or not you want to upgrade or create tables, but it didn't. But you can do so manually by doing this:

http://www.domain.com/forums/links/links_admin.php?op=create_tables

Or, whatever the path to that file may be. That will create the tables, and all of the SQL errors should have went away
Posted By: Ian_W Re: I can't seem to install this correctly - 06/24/2003 10:08 AM
As soon as you go into the Admin section, it gives you the link to do that
Posted By: msula Re: I can't seem to install this correctly - 06/24/2003 2:30 PM
Yes.. it should give you a link to that, but it didn't

So I just went through the admin script and looked for the code where the link was supposed to be displayed, copied and pasted it, and then it worked.

But by default, it was not displaying the link
Posted By: fishtails Re: I can't seem to install this correctly - 06/24/2003 9:28 PM
The link should have been at the bottom of the main admin page. Thanks for the language files Rutto, I'll check them out.
Posted By: donJulio Re: I can't seem to install this correctly - 06/25/2003 12:52 AM
Thanks! It's working now!
Posted By: Rutto Re: I can't seem to install this correctly - 06/26/2003 10:44 PM
[]Thanks for the language files Rutto, I'll check them out.[/]

You're welcome let me know if you like it !
OK, I've installed this on a site now. Unfortunately many language strings weren't in the language file so I had to do a lot of editing. Unfortunately I didn't remember about Ruttos changed version, so I did my own. I'll attach my version anyway, since it includes a Swedish translation of the language file as well. Also, I changed the date() call to use threads internal convert_time() so that the date format will be the same as for the forums.

I managed to get this to work with threads 6.1, I only needed to remove the calls to get_input() and copy the table_wrapper() function from a newer version of ubbt.inc.php.

A few notes:
  • The string "(Member)" which is attached to usernames in the lists would look better if it was outside the link text. No biggie though.
  • When running links.php the first time before the tables are setup, there are a lot of errors. It would much cleaner if the script would check if the tables are created and if not, just show the link to create them.
  • Add title="" description to all Edit/Delete images so that tooltips work for Mozilla/Netscape.
  • When the table has been created, remove the bolded text at the top of the admin page to avoid confusion.
  • An approval mail is sent when an admin adds a link as well, even though they are auto approved.
  • The approval mail should include all information about the link as well as a link to the approval page.
  • When a link is approved (or not approved) a mail should go out to the submitter with a notification.
  • The category titles should be read from the database and not passed in the url like it is now.
  • Using special characters in category titles results in them and all extra text getting lost when showing a category. That is, things like + and &.


Some feature suggestions
  • Report this link, to notify the admin of broken links and such.
  • Multi-level categories. Instead of just one level, let categories be able to be children to any category.
  • Randomize link - for some fun browsing
  • Searching - Even better if this could be integrated in threads search function, but that would require modding, which might not be so good.
  • With many links in a category, it would be good to show only x links at a time.
  • Move all html into templates for each page, just like in threads. Code that is the same on all pages should be in their own templates as well. Changing the way a link is shown in several different places isn't fun.
  • XHTML-compliancy. It's not there yet.
  • Cool links, let admins set a flag on some links to show them as cool. These should always be listed at the top in the list, as well as having a little cool icon next to it.
  • Ability to have categories for each forum automatically. I decided to have the same categories as forums, so it would be great if that could be done without having to add them by hand.
  • When clicking on Submit link, the category you are in should be pre-selected.
  • A validity check script that can be run from time to time, which checks that the links are still valid. If it isn't, a counter should be increased, when it hasn't worked for x times, the link should be unvalidated again and the admin notified. If the link is again reachable, the counter should be reset.


BTW, did I say that the script works great and is very useful?

Attached File
87960-TLD-1_5OJ.zip  (53 downloads)
Excellent notes and suggestions. Progress has slowed almost to a complete halt. As usual, other things more important keep coming up, but I do get a little done at a time. I may have to do a post like Scream did regarding 6.4 that "Made ya look".
Posted By: magik Re: fish.... - 07/12/2003 2:52 PM
how disabled "Admin receives email when link is submitted " ?
Posted By: xeney Re: problems creating categories - 07/13/2003 7:36 PM
This may be a problem with the server I'm using (I'm trying this out on a test server with an iffy mySQL installation), but every time I try to add a category from the admin screen I get a message saying, "You did not enter anything. Try again." Is this a permissions problem or something else? Thanks.
Posted By: shortbus Re: problems creating categories - 07/13/2003 9:42 PM
I think it is permissions. I had that problem too, but Nikos fixed it. I can't remember what it was exactly though.
Posted By: xeney Re: problems creating categories - 07/13/2003 10:13 PM
We've checked the r/w/x permissions on all the relevant files, but that doesn't seem to be the problem. My boyfriend thinks it has something to do with the version of PHP we are running (it's a recent upgrade and I think it's the most current version, but I'm not sure).
I added some/most of rutto's xhtml changes to gardener's files... we're using them here

Attached File
88728-TLD-1_5Ok.zip  (301 downloads)
Check this out. I had someone submit a link for a forum at Univision.com's forums (I have no problem with that). When the arrow of the mouse pad is hovering over the link, the redirect URL appears in the grey box at the bottom of the page. Everything looks correct. You can check it out here:

http://www.laondalatina.com//foros/...title=Entretenimiento&title=M%FAsica

Here is the URL of where the link should go to:

http://infopop.univision.com/2/OpenTopic?a=frm&s=864094322&f=33259689241

The problem is that when I click on the link in the links direcoty, it cuts off the URL and I get an error from Univision.com (obviously, if the URL isn't complete). But I don't know why the link is incomplete if the redirect that shows up in the grey box near the bottom of the navigator window (the one that says "Done" when a page finishes loading) has the complete URL.

On top of that, there seems to be no way to edit the link (because at first I though the author didn't inlcude the whole URL). Either way, the whole URL was indeed included, so I don't understand why the redirect isn't working.

Any help would be appreciated
I checked it on my development site and the problem occurs there as well.

As far as editing the link, 1.5 provides that feature. Make sure logged in as admin and go to the page of the link you want to edit. You'll see a red and green dot next to the link. Click the red one to delete it, click the green one to edit the link.

Meanwhile I'll look into this.
Maybe it was thrown off by the "&" symbol, because it stops the redirect right befote the "&" symbol in the URL. BTW, thanks for the explanation. I didn't know what those dots were for :lol:
I've discovered the problem. Let me try a few things and see if I can correct it. I'll get back ASAP. Good job catching this bug.
Posted By: fishtails Re: TLD 1.5 Bug fix - 07/18/2003 10:43 PM
donJulio found a bug in regards to a particular link that would not redirect.

The problem resides in the url link itself http://infopop.univision.com/2/OpenTopic?a=frm&s=864094322&f=33259689241 . Using a GET request, PHP is stripping the url where it thinks it's supposed to assign a variable i.e. the letter s is now $s and f is $f. Since the entire url needs to remain intact and treated as a string I came up with the following solution. This should also solve any other urls with this same type of problem. If anyone can come up with a more efficient way let me know.

Open links_redirect.php and find:

$update_hits = $dbh -> do_query($query);

Add the following just below it:

$query = "
SELECT *
FROM {$config['tbprefix']}links_links
WHERE lid = '$lid'
";
$geturl = $dbh -> do_query($query);
$row = mysql_fetch_assoc($geturl);

header ("Location: $row[url]");


Find and delete the following:

header ("Location: $url");


That's it.
Posted By: donJulio Re: TLD 1.5 Bug fix - 07/19/2003 7:05 AM
Thank you for the fix I've never found a bug before. I'd like to thank all the little people out there who helped make this moment for me possible where, for the second time, I get to contribute something useful to this community (after my Blue Cheese stylesheet). Thanks you everyone :sniffle:
Posted By: AKD96 Re: TLD 1.5 Bug fix - 07/19/2003 9:55 AM


Posted By: MattyJ Re: TLD 1.5 Bug fix - 07/21/2003 6:56 PM
Just a side note... had to fix the valid_email function in the links_submit_link.php file... it was saying that [][email protected][/] (using two or more periods in the domain section of the address....)

here's the updated code.

function valid_email($email)
{
// lets see if the email is possibly valid
// if (ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))
if (ereg("^[a-z\'0-9]+([._-][a-z\'0-9]+)*@([a-z0-9]+([._-][a-z0-9]+))+$", $email))
return true;
else
return false;
}
Posted By: AllenAyres Re: TLD 1.5 Bug fix - 07/22/2003 7:18 AM
hey Matt! Good to see you
Posted By: MattyJ Re: TLD 1.5 Bug fix - 07/31/2003 5:48 AM
Glad to be back, bro! It's been a busy while, if you know what I mean!

Posted By: AKD96 Re: TLD 1.5 Bug fix - 08/14/2003 5:25 PM
Bump? Any updates on TLD?
Posted By: Dave_L_dup1 Re: TLD 1.5 Bug fix - 08/15/2003 6:38 AM
I started with the version posted by Allen.

I've made a number of changes in getting this suitable for use on my site. I'll see if I can document them and post the changes.
Posted By: AKD96 Re: TLD 1.5 Bug fix - 08/15/2003 3:57 PM
Posted By: AllenAyres Re: TLD 1.5 Bug fix - 08/16/2003 5:27 PM
Posted By: fishtails Re: TLD 1.5 Bug fix - 08/22/2003 8:04 AM
Sorry guys. I've been so busy with home honeydos when I logged in I noticed over a thousand new posts! I don't think I'll be reading all of them. But, I have been working on TLD, just very slowly. I want to take into consideration all of the suggestions, changes, enhancements, etc., that everyone has made. I hope everyone understands. Anyway, I was just checking. Later.

Mark
Posted By: AllenAyres Re: TLD 1.5 Bug fix - 08/30/2003 5:29 PM
thanks for the update mark
Posted By: bison Re: TLD 1.5 Bug fix - 11/08/2003 9:21 AM
this one has prolly already been caught... but in the current version attached to this post the links_admin.php had a problem at the very end:

reads:
print "</td></tr>";
print $tbclose;
print <p align="center"><font size="-2"><b>TLD by <a href="http://www.fish-tails.net">Fishtails</a></b></font></p>";

had to add in the " on the third print line to get anything out of it:

print "</td></tr>";
print $tbclose;
print "<p align="center"><font size="-2"><b>TLD by <a href="http://www.fish-tails.net">Fishtails</a></b></font></p>";


I'm no programmer... so if it was supposed to be like that for some reason then flame me down however, i couldn't make the fecker work otherwise!
Posted By: shortbus Re: TLD 1.5 Bug fix - 11/08/2003 7:06 PM
I'd sure love to see a google style directory, if you read this--regarding the way the subcats are displayed.
i got it installed but when i try to add the first catagory the form come back and says i didnt enter anything (as if i hit submit without filling out the textbox)

any ideas?
Posted By: xeney Re: TLD Bv1.5 Released - Threads Links Directory - 11/12/2003 10:06 PM
That is the same problem we had. We isolated it as a "problem" with newer versions of PHP -- the links directory will not work because of higher security in newer versions of PHP. We found a workaround but it was a giant pain in the neck and we never bothered installing it on our public server. I will see if we have a copy and if so I will post it.
[]shortbus said:
It wasn't showing them as being submitted. Don't know what the problem was but Nikos fixed it I guess. [/]

Who or what is "Nikos"??? Im having the same problems as you and i would like to get this fixed... This mod looks awesome, but it wont work on my machine...

I had the problem of Categories not getting added. I added the link Josh said to under the "get" line... And that fixed the category posting problem, but now its not allowing website submittals.

Its like its not even reading in any of the info on the submit form at all???

Im double checking the Globals though just in case the server config is wrong.
Deejay
Some fixes:

In links_submit_link.php
Code
<br />Find this:<br /><br />        if (ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))<br /><br />Should be:<br /><br />        if (ereg("^[+_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $email))<br /><br /><br />Otherwise some emails won't appear valid - this is the same pattern that adduser.php uses.  :)<br /><br /><br /><br />Find this:<br /><br />                 $description = addslashes($description);<br /><br /><br />Change to this:<br /><br />                 $description = addslashes($description);<br />                 $name = addslashes($name);<br /><br /><br />Otherwise a Username of L'Accrocchista can't submit links. :)<br /><br />
Would be nice if the catagory sorting was in order in the drop down link for submission and approval. The sub catagories are very difficult to use if you have a lot of them. Oh and the top catagory should be in bold so it is easier to see when your viewing subcatagories.
DOWNLOAD: RECENT VERSION IS ATTACHED TO ONE OF MY MORE RECENT POSTS (BELOW)

I've done some minor visual hacking and came up with this...
http://www.celicahobby.com/ubbthreads/links.php

Your program is awesome and is getting some very exiting attention from all my members - Excellent work!!!

BTW, I've also hacked the program to have all the links_...php files in correct ubbthreads locations - links/languages in languages, links/templates in templates...etc. This setup makes updating on several UBBT sites a lot easier since there are less directories to search through for modified files.

I've also applied all of the listed html and php patches from this thread as of 12/5/2003
Looks very nice I will give it a go... my subcatagories need this update badly.
The subcatagories worked great but having trouble with some of the other link from the admin section.. blank on add links.

I also had trouble with the images but tracked down where you had them.. two different locations according to setup. Easy fix just added new.

Then on trying to click on a link from database the dreaded 500 enteral error shows up.
Looks like your directory tree is way different than what I was using.

could you show some paths so I can get the files in the right spots.
Hi,

"We isolated it as a "problem" with newer versions of PHP -- the links directory will not work because of higher security in newer versions of PHP."

Which version was this?

"We found a workaround but it was a giant pain in the neck and we never bothered installing it on our public server. I will see if we have a copy and if so I will post it."

Would be interested in this, as this sounds like a very good mod, but the 'problem' mentioned above has me a little worried. I get a bit on edge when hearing about security issues.

Sanuk!
DOWNLOAD: RECENT VERSION IS ATTACHED TO ONE OF MY MORE RECENT POSTS (BELOW)


The file includes all of my new images and they are in the correct locations.

The main Admin page has been tweaked a bit and will explain exactly what that DB error is when first running the ADD-ON (as the original author of this ADD-ON first wrote with it)

The Links files are now completely inside the UBBT tree and fit correctly with all of the UBBT Tree formatting (the PHP security errors that 'ksanuk' has listed, should now be corrected because of this new file location structure)

I've included my MODIFIED files in this archive, along with all the ORIGINAL files (two separate directories when extracted)

Installation is simple, if this is a new install, just copy all the file from the "MODIFIED_FILES" inside the archive to your UBBT directory - since all the files in this dir are NEW, nothing will be over written.

then log into your forum administrator account and type http://www.yoursite.com/ubbthreads/links.php and choose "ADMIN" from the bottom right corner and follow the directions from there - everything else is self explanatory.

Enjoy!

All base coding is the work of fishtails - the only thing that has done is modified it to be HTTP/PHP/UBBT compliant and made it look spiffy
By the way - I've added the ability to add a desription to the categories... but you will need to manualy edit that description through your fav MySQL interface


EXAMPLE:

[]https://www.ubbdev.com/uploads/101206-screen.jpg[/]

Attached picture 101206-screen.jpg
Hi,

Thanks. Will try adding this over the weekend.

Sanuk!
Posted By: ksanuk Re: TLD Bv1.5 Released - Threads Links Directory - 12/06/2003 10:10 AM
Hi,

I got some database errors when running this

The error message I received, when creating the tables, was this :
SQL ERROR: Unable to do_query: CREATE TABLE w3t_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) )
You have an error in your SQL syntax near ''', cat_order tinyint(10) NOT NULL default '0', ' at line 8Database tables have been created. You can now add categories and links.

Any idea what messed up? And how I can fix it?
Also, will the other 2 tables have been created, or did the script stop when this error occured?

Sanuk!
is there a way to sort the subcatagories for the drop down list? I have a lot of subcats and they run together on the list to pick. I am using prefixes in front of the sub cats now so I can pick them out.

Thanks for the help... mine looks very nice and after I pulled my head out of the sand I figured out you put the files into the main threads directories. Thats why I was having trouble with my install.
It would be nice to have this contribution only show CATS/SUB-CATS if there are links in it. ie; no link, the end-user will not see the CAT and thus will not waste their time visiting that zone
Oh my request is for a sort when using the "submit a link" The drop down box is not sorted properly and makes submitting difficult. It might just be a small tweak on the links_submit_form.tmpl or the links_submit_form.php


The form is... but how do I sort.
[]
<form action="links.php?op=Add_Link" method="POST">
<input type="hidden" name="cat_id" value="$cat_id">
<table border="0" cellpadding="2" cellspacing="2">
<tr><td align="right"><b>{$ubbt_lang['LINKS_SUBMIT_SELECT']}</b></td>
<td> [/]

should this be by cat_order instead?
Posted By: isaac Re: TLD Bv1.5 Released - Threads Links Directory - 12/08/2003 12:47 AM
To sort the "Select Category" drop down menu...

in links_submit_form.php,

FIND:
$query = "SELECT * FROM {$config['tbprefix']}links_categories";

REPLACE WITH:
$query = "SELECT * FROM {$config['tbprefix']}links_categories ORDER BY title";
thank you for your work on this... very nice
I get this when trying to install new:

[]
SQL ERROR: Unable to do_query: CREATE TABLE w3t_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) )
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 ''', cat_order tinyint(10) NOT NULL defaDatabase tables have been created. You can now add categories and links.
[/]

any idea what the prob might be?
the image links in the templates need to have

"../images/

changed to:

"images/

and the images in the zip file need to be moved to images/links



any help with the table creation would be swell
Hi,

Got the exact same error.
Just wondering, should there be quotes around the 0 (i.e. should this "default '0'", be "default 0")? I mean we are creating an integer, but trying to fill it with a char / string. Does not sound logical to me.

Sanuk!
The DB Error was fixed in any download after 12/5/2003. It was due to the addition of the 'Category Description', as posted the screen shot above.

If you currently have a previous version running and just want to update with my modified version, run the following SQL statement to update your database with the new description column.

ALTER TABLE 'ubb_links_categories` ADD `cat_desc` CHAR(60) DEFAULT NULL

...

I've updated this archive again, with alternative icons to fit your forum's setup much nicer. The alternative icons can be found inside ubbt/icons/links_alt-icons directory - just rename and overwrite your previous ones.

I've also corrected the problem of duplicate "new.gif" icon (forum and links calling the same file), by calling the links icon "newlink.gif" and updated the links php files to reflect the changes.

ATTACHED FILE IS MY MOST RECENT MODIFIED VERSION... of fishtails' TLD

Attached File
101352-Links15-20031207.zip  (52 downloads)
I used the download from today... still the same error smirk
hmmm... I changed the create table to this and it seems to work fine now. Did it break something I should look for?

Code
 <br />CREATE TABLE w3t_links_categories <br />( <br />cat_id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, <br />parent_id int(11) DEFAULT NULL, <br />title varchar(50) NOT NULL DEFAULT '', <br />cat_desc varchar(60) DEFAULT NULL, <br />cat_order tinyint(10) NOT NULL DEFAULT '0' <br />) <br />



Attached is the xhtml'd templates, if you don't mind adding them to your work - thank you

Thank you again for your work, very appreciated

Attached File
101354-default.zip  (37 downloads)
The drop down list is better but not quite right. Can it be ordered so subcats fall below the cat titles the associate with? Similiar to how they list them in the ADMIN section under "show catagories" link. I need this because I break thinks into sub cats in different states. So that lists the states subcatagories all together instead of under the separate catagories.

This is looking sweet.. thanks
[]Smilesforu said:
The drop down list is better but not quite right. Can it be ordered so subcats fall below the cat titles the associate with? Similiar to how they list them in the ADMIN section under "show catagories" link. I need this because I break thinks into sub cats in different states. So that lists the states subcatagories all together instead of under the separate catagories.

This is looking sweet.. thanks [/]

thanks for reminding me - that was the next thing I was going to work on

The example I posted above was in alphabetical order listing
AllenAyres, added your code - Thank you!
Hi,

Yep, everything working now, and my Mods and I are busy entering links

Some questions though:
- How do I delete a subcatogory?
- Is it true that I can only have 2 levels of categories (i.e. category & sub-category)?

Sanuk!
very nice
Just an FYI for most people the command would be

ALTER TABLE w3t_links_categories ADD cat_desc CHAR(60) DEFAULT NULL

the ` will make the query fail
Omegatron, good points!
I keep forgetting that UBBT has a SQL entry page built into it - I generally use MySqlAmdin and just took the command directly from its "build SQL command" utility
Actually that query failed for me in PHPMYADMIN which I use almost exclusively.
Thanks Chuck, added it here now:

https://www.ubbdev.com/forum/links.php

the subcats don't show anymore.. something I did? Being able to delete empty ones would be nice ... plus a 'credits' page to acknowledge the authors and versions
Allen that would be hard to do credits that is LOL

At one time when this first came out I XHTML'd the whole thing for him and then as it got worked on more the templates were blown and I see you did it again LOL

Your subcats dont show? HMM maybe I will test that out. Being able to delete empty cats should just be a query and a button for it I can do that for you.
Posted By: isaac Re: TLD Bv1.5 Released - Threads Links Directory - 12/11/2003 12:55 PM
[]AllenAyres said:
Thanks Chuck, added it here now:

https://www.ubbdev.com/forum/links.php

the subcats don't show anymore.. something I did? Being able to delete empty ones would be nice ... plus a 'credits' page to acknowledge the authors and versions [/]

in my recent release, I commented out the showing of subcats... Reason for this was because I didn't like how it showed "(0)" links for directories that had several subcats WITH "(20)" or even "(40)" totals inside each one of those sub-cats. Plus in sections where there was 10 sub cats and right next to that section was another that only had 2 subcats, the display looked really bad.

If you have good category names, then for the end-user to find exactly what they want, shouldnt be that dificult.

I was planning on adding an option in the admin page to make display of the subcats on main page an option. But untill then...its easy to restore that feature manualy:

1. just head into the code for the main links page ( links_show_cat.php )
2. uncomment ALL of that long set lines in the subcategory section. (To uncomment a section, just remove the "//" from the begining of the lines)
3. save and re-upload to your server

..as far as crediting the authors - as long as the original code is included in the archive and all of the author's respects are left intact into the original code and our new code, I think this should be enough - I have still yet to see a fully modified UBB site (including this one) that lists each and every contributor, with exact version notes and links to those authors sites, for all the public to browse through. As long as the copyright is kept inside the code for each programmer to see and respect the bulk of the work, I'm sure thats enough - unless otherwise requested.

At this point, I would much rather begin a new topic to discuss copyright issues - than hijack this thread and the cumulative work by many people that is currently being put into the progress of this masterpiece
AllenAyres, your install looks good in the default theme here!

I've included additional icons in my latest archive of this module. These additional icons could be used as an alternative to the white ones, for anyone using a default theme with a light header background.

Best regards,
-isaac
thanks id, yeah it turned out well.. I'll see about adding the subcats back in. In the meantime, Chuck, would be great to add a button to delete cats/subcats within the admin page
OKay I will work on that
grazi
Allen,

Try this one links_admin file. I tested it a bit over at my site. I added a check so that a category that has links can not be accidently deleted otherwise it deletes cats just fine.

[]http://mywebpages.comcast.net/omegatron/shot1.jpg[/]
[]http://mywebpages.comcast.net/omegatron/shot2.jpg[/]
[]http://mywebpages.comcast.net/omegatron/shot3.jpg[/]




Attached File
101755-links_admin.txt  (376 downloads)
works very well, thank you
Posted By: Zarzal Re: TLD Bv1.5 Released - Threads Links Directory - 12/15/2003 12:52 AM
how do I move an already enterd Link to ne category ?
Zarzal.

Functionality of this hack is ever changing. Allen asked for the ability to delete a category. The box telling you that you can not delete the cat until you move the links is purely a SECURITY measure on my part. I did not want people to accidently delete their cats that contained all their links which would mess them up.

You can move the links by selecting the green button on each link and changing its category. I have not coded up a mass move thing but it would be easy enough to do if enough people are interested.
Thanks. Right now I found the green button by myself. Now I try to combine the script from Fishtail with the language modification from Rutto ad your modifcation for the Adminpanel. I add also german translation. Seems to work, but is not perfect. A lot more text must from the script to the language file.

Now, I go to sleep and take a look tommorow on the code.
What I would do is download the latest content from id242 and the XHTML templates Allen has posted here along with the admin file I posted. this will give you the most current content. You can then add in your language translation.
Hi everyone. I just wanted to drop in and appologize to everyone for not keeping the community updated on TLD and what's been going on. Truth of the matter is I've been on medication for about 7 months now and it has some crappy side effects. Esentially when I do feel like getting on the PC I check out my fishing site, post a little then get back off because I get a headache. Anyway, it looks like TLD has been getting some work to it. When I feel up to it I'll download a copy and compare it to what I have. I haven't even installed TLD on my fishing site yet! I've been needing to update my site with the latest threads and photo post and can't even get the gumption up to do that either. Hopefully I'll get off this crap soon and things will get back to normal.

Until then, y'all have a Merry Christmas and a Happy but safe New Year!
Thanks for the update - take care of yourself.

That's the great part of a community like this - other people can expand upon great work for an even better mod/addon.

Thanks.
Get better soon!!
hope you're feeling better very soon !!
Just a note... I downloaded what I think is the latest copy of this (looks much like what is here at threadsdev), and found that if I allowed anonymous users to submit links, the form was a little out of whack... (the e-mail input box wrapped to the next line...)

To fix this, open links_submit_form.php and change line #63 to this:
Code
$submitter_email = "<b>{$ubbt_lang['LINKS_SUBMIT_EMAIL']}</b></td><td><input type=\"text\" name=\"email\" value=\"\" class=\"formboxes\" />";

instead of
Code
$submitter_email = "<b>{$ubbt_lang['LINKS_SUBMIT_EMAIL']}</b><br /><input type=\"text\" name=\"email\" value=\"\" class=\"formboxes\" />";

That seemed to fix it for me.

Thanks for all the updates on this!!
Original zip from first post updated with the latest code from this thread. Please let me know if I missed anything

Thankyou to everyone who's contributed their time and knowledge to this great piece of work

I fixed a few more xhtml errors, there's still a few left
Just to make sure, becuase I want to upgrade this also: It's Fishtails original .zip that you updated? Thanks!
is the subcatagory sort fixed on the add a link drop down form?
I just downloaded the zip from the first post and still got the following SQL error during install:

SQL ERROR: Unable to do_query: CREATE TABLE w3t_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) )
You have an error in your SQL syntax near ''', cat_order tinyint(10) NOT NULL default '0', ' at line 8Database tables have been created. You can now add categories and links.


I found the solution in the thread but it must have escaped inclusion into the updated zip.

Bill
Hi,

This hack could be a nice way to make some additional ad revenue. What I was thinking about was to allow sites / companies that you link to to upgrade their link, for a fee or free (up to you I suppose).

This upgrading could be a different style to the link (i.e. larger font / bolder / italics) or even a small banner displayed next to or below the link.

It would be even better if we could add different levels of priority to the links (each with a different style associated to them) and then sort the list on links by priority first before alphabetically.

How much work would it be to add these features?

Sanuk!
I noticed here at Threadsdev when you check the 'Who's Online' scrren it will show that someone is viewing the links database. The version of TLD I just installed just shows 'Private' when someone uses the db.

Is there some code I have to add to get the Who's Online screen to display members using TLD?

Thanks,
Bill
[]bjsjr said:
I noticed here at Threadsdev when you check the 'Who's Online' scrren it will show that someone is viewing the links database. The version of TLD I just installed just shows 'Private' when someone uses the db.

Is there some code I have to add to get the Who's Online screen to display members using TLD?

Thanks,
Bill [/]
Bill,

Add the bellow code to your /ubbthreads/language/english/online.php file.

Code
$ubbt_lang['links']  =  "Links Page";
Thanks a lot! I knew it had to be something simple

Bill
I wonder if anyone can help. I just uploaded the links directory to /ubbthreads/links and when I try to go to /ubbthreads/links/links.php, I get the following error message:

===========

Warning: main(main.inc.php): failed to open stream: No such file or directory in /home/flighta/public_html/ubbthreads/links/links.php on line 52

Fatal error: main(): Failed opening required 'main.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/flighta/public_html/ubbthreads/links/links.php on line 52

===========

Line 52 is:

$html = new html;

===========

Can anyone tell at a quick glance what I might have done wrong?

Thanks,

Jason
[]Sky YYZ said:
I wonder if anyone can help. I just uploaded the links directory to /ubbthreads/links and when I try to go to /ubbthreads/links/links.php, I get the following error message:

===========

Warning: main(main.inc.php): failed to open stream: No such file or directory in /home/flighta/public_html/ubbthreads/links/links.php on line 52

Fatal error: main(): Failed opening required 'main.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/flighta/public_html/ubbthreads/links/links.php on line 52

===========

Line 52 is:

$html = new html;

===========

Can anyone tell at a quick glance what I might have done wrong?

Thanks,

Jason [/]
If I recall correctly, you need to put the files in the ubbthreads directory with the current changes or redirect them to the /links folder.
Yep the files no longer go in their own directory. They follow the threads directory structure now.
looks like im going to have to give this one another try...
Hi guys,

Okay I installed it in the /ubbthreads directory. I clicked on "links administration" and this is what followed:

=======================

If you have NOT already created your database tables and this is your first install, you can do so by clicking here. :: So I did.

=======================

Next I got this:

=======================

SQL ERROR: Thu, Jan 08 2004 15:55:28 -0500 Unable to do_query: CREATE TABLE w3t_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) )
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 ''', cat_order tinyint(10) NOT NULL defaSQL ERROR: Thu, Jan 08 2004 15:55:28 -0500 Unable to do_query: CREATE TABLE w3t_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 '', 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) )
Table 'w3t_links_links' already existsSQL ERROR: Thu, Jan 08 2004 15:55:28 -0500 Unable to do_query: CREATE TABLE w3t_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) )
Table 'w3t_links_favorites' already existsDatabase tables have been created. You can now add categories and links.

========================

and when I clicked on "Links Home" in the navigation bar I got this:

========================

SQL ERROR: Thu, Jan 08 2004 15:57:24 -0500 Unable to do_query: SELECT * FROM w3t_links_categories WHERE parent_id = '0' ORDER BY 'cat_order'
Table 'flighta_thread.w3t_links_categories' doesn't exist
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/flighta/public_html/ubbthreads/links_show_cat.php on line 66

=======================

It looks like the w3t_ table(s) didn't create automatically? Don't suppose there are any more ideas? Sorry, I wish it had gone smoothly.

Thanks,

Jason
Looks like I need to find where the create table code is, more specifically "w3t_links_categories" and change it to:

CREATE TABLE w3t_links_categories
(
cat_id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
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'
)

....looking for it now.
That was it! Found it in links_admin.php and replaced the code starting on line 488.

Off to work I go...

Thanks!
hmm quick.. someone call the net.. hes talking AND answering himself...
haha... yeah, actually I get bugged about that at work all the time! There's one person worse than me though!

Well I figure this way if anyone else has the same problem they will see how to correct it... hence the talking to myself bit.

There are a couple of different troubleshooting techniques to try deep within this thread... but this is the one that works for me. Maybe the code could be updated in the original d/l by the powers-that-be. Or not, either way... this is a great mod. Thanks!
Well here's something maybe someone else can help me with...

I noticed it won't validate links from within your own domain. Is there a trick to get it to do that?

Thanks!
how do you mean? GOt an example?
I finally got arround to looking at the html updates as well as some of the code changes. I've uploaded it to the test site. Very nice work. Thanks for the contributions. I am almost able to start working on the script again to get the desired features in.

One question though. When I first began the project I wanted to keep all the files in a seperate folder with links.php being the only file directly within the ubbthreads folder and all other files in a seperate links folder. I felt this was better so as to facilitate upgrades and such. It's apparent that is not the case. What advantage is there by mixing them up with the ubbthreads files? I'm sure there is one, but at the moment I can't see the trees for the forest.
I guess the main advantage is making them follow the threads hierachy and file structure templates languages etc etc.
From...
https://www.ubbdev.com/forum/showflat...vc/1#Post101199
and explaned right below it

"The Links files are now completely inside the UBBT tree and fit correctly with all of the UBBT Tree formatting (the PHP security errors that 'ksanuk' has listed, should now be corrected because of this new file location structure)"
Um, I noticed my link was removed. What was it, bad html?
I doubt it would have been bad html. I think if I remember you had it in a paragraph tag outside of all the tables centered. I would think whomever removed it should not have done so without asking you.

Since it is not a copyrighted program anyone using the hack has the right to remove the link from display and most probally would as a sidenote.
I was kidding about the bad html. Very well. I didn't realize it would be too much to ask for the link to be retained. I'll keep that in mind from now on.
I think your copyright should have been retained in the distribution here. I was just pointing out that individuals user's who download the mod might remove it since unlike copywrited products like Threads they can remove the link with no adverse repercussions like normal software. I personally think the link to your site is the least they could do for writing the mod. Obviously everyone has an opinion though so maybe the possibility of a config option of whether to display the copyright or not would do the trick. Obviously the person who did the bulk of work on rewriting things while you were gone did not like the copyright and removed it.

Here is an example

What I mean is allow users to choose:

Up top of links.php on the config variables add:

$copyright = 'yes';

Down bottom of the links_footer.tmpl you can add this:

if ($copyright == 'yes') {
print "<p align="center"><font size="1">TLD Bv1.5 by <a href="http://www.fish-tails.net">Fishtails</a></font></p>";
}


I found your original files and grabbed the copyright text. I have attached your mod with the copyright on their in a config variable naturally turned on to the first post so people download the latest with copyright info.

Also since I had a few minutes Allen said he went through and got alot of validation errors. I got all the ones on the main links pages show_links and show_cats so they now validate for you.

Attached File
104718-Links15.ZIP  (62 downloads)
normally I would leave a copyright in for a mod someone did a lot of work on... not sure why it was removed, I think I questioned it in here somewhere
[]AllenAyres said:
how do you mean? GOt an example? [/]

Sure, for instance:

When I try to add: http://www.flightattendants.org/photopost/index.php, the program says it's an invalid link, yet when I click on the link it provides to verify, it goes right to that page on my site. Strange.

fishtails, if the code is updated soon I will be happy to download the new version which includes a copyright notice on your work. I was sorta surprised that there wasn't one to begin with but I figured whoever wrote it didn't include it. If I may, I'd like to speak freely here regarding copyright notices. A site with loads of mods can be crowded with copyright this and copyright that and quite frankly, it starts to look untidy. Last fall I decided to ask my Members for an (optional) one-time $10 CDN donation to help improve the site - completely optional - and of the 3300+ Members, almost 90 have come through with anywhere from $5 to $10. It payed for a whole year of hosting, a couple of programs, and several upgrades to my site, making it a better place for all to visit. Those who made a donation are identified in their posts by a special Member status, similar to Josh's UBB Beta Tester .gif, as a gesture of thanks. Along the same lines, you could permit the removal of your copyright notice. That goes for anyone who spent a lot of time working on a popular mod.

I wonder if you would heed Omegatron's advice and make your copyright notice an optional display in your next release? Those who do not wish to have yet another copyright notice could pay you a fee... say $10? You could provide an easy paypal link somewhere in your download or simply your paypal e-mail address. It would be hard to enforce it but it might help cover some of your expenses if enough donations came in. Something affordable enough that almost everyone would have an opportunity to participate. I would certainly be in line to pay you a gesture of thanks. Your program is very similar to HotLinks SQL which is a $65 program. I owuld consider yours similar to an "Hotlinks SQL Lite" if it existed.

Again, nothing personal, it's just that too many copyrights all over your site and it starts to look untidy, IMHO. Food for thought... and why not, you worked hard to provide this code I'm sure. Josh charges for his search engine optimisation code, and excellent mod I might add, and although financially it's probably out of reach for quite a few people, I see nothing wrong with asking for a small fee in order to remove your copyright notice, if that's something you want to consider. You obviously enjoy writing code in your spare time, there's no shame in asking for some sort of financial thanks for those of us who would prefer one less copyright notice on our site if possible.

Another example is that I'd love to have the full-version integrated Sigma Chat with auto-authentication, but the jump from zero to $100 USD per year ($135 CDN) is too much for my pocket book and I don't get enough member donations to cover that, otherwise I'd love to pay that person some money. See where I'm coming from? If it's affordable the masses have the option to participate. Not that I think Josh's code or Sigma Chat's code isn't worth every dime... it's a matter of affordability. If you can consider taking less than it's worth, maybe more will contribute and volume will give you a little more incentive to keep pluggin forward with great code. Hope I'm not tarred and feathered for my suggestion

IMHO,

Jason
Sky there was a copyright notice to begin with that is my fishtails asked since he had been absent for awhile and mutliple people updated the mod. The problem was somewhere not meantioning names the copyright link was removed. Mods are not copyrighted programs and can be changed. However in good conscience most of us leave any copyrights alone. The remark I made was that while everyone has a legal right to remove any copyright text on mods as they are not patented like other programs it may not morally right to do so in good conscience. The suggestion to make it a configurable option is simply a remark made since I spent too much time on the Photopost website. Michael can tell you those guys want everything to be an option to enable or disable.

At any rate my last post has some XHTML corrections and Fishtails copyright placed back in the mod. It is set to display but you can disable it in the links.php in the configuration settings.

I though have enabled it set to yes on my site as it is only right after all his hard work on this mod that I at least provide a nice link to his site for Google to play with
google doesn't play that much anymore.. ever since the Florida incident.. but Josh sure is getting slurped alot he must have paid that 79$ to list your URL
Naw, I just needed examples to support my suggestion. I think by slurped you mean complimented, and yes, I was trying to be careful with my words so as not to insult anyone. By the way, what was the Florida incident? I'm a newbie to UBB.threads... was a .classic user for a couple of years before I hopped the fence. Also, where can I find that serverinfo.php you use? Is it available for d/l anywhere... it's pretty neat and I wouldn't mind verifying my hosts claim that they use P4 3.06GHz processors.

Omegatron, I'll download your update this week when I have time. Working nights tonight and leaving in an hour. Have Monday and Tuesday off though. It's the original d/l link on page one that you updated, right?
It's actually the attachment to this post.
[]Sky YYZ said:
Naw, I just needed examples to support my suggestion. I think by slurped you mean complimented, and yes, I was trying to be careful with my words so as not to insult anyone. By the way, what was the Florida incident? I'm a newbie to UBB.threads... was a .classic user for a couple of years before I hopped the fence. Also, where can I find that serverinfo.php you use? Is it available for d/l anywhere... it's pretty neat and I wouldn't mind verifying my hosts claim that they use P4 3.06GHz processors.

Omegatron, I'll download your update this week when I have time. Working nights tonight and leaving in an hour. Have Monday and Tuesday off though. It's the original d/l link on page one that you updated, right? [/]

no slurped means look at the Who's online..

[]
Mozilla/5.0 (Slurp/cat; [][email protected];[/] http://www.inktomi.com/slurp.html) />



slurp is
www.inktomi.com's bot.. its a Yahoo company but charges for inclusion

the google Florida incident.. ell that I will have to leave up to your imagination but it doesn't resolve around threads....
slayer60: Got it, thanks. Will update the Links mod this week.

scroungr: Thanks, will look into the Florida thing when I have more time... I'm curious. Also, I noticed inktomi has done a small crawl on my site (less than 1 mb) but I haven't paid them anything. It's been back 48 times according to my stats. I wonder why it came to begin with? Oh well, can't know everything all of the time
scroungr actually I updated the main first link as well to keep things current just as Allen did a week or so back and just because I think Mark's copyright should be back on there.
I agree didn't mean to implie I didn't I always leave a copyright note if there is one
Nope did not take it as that Just answering your question about whether I updated the first post as well

I may go through the couple remaining files for Mark and make sure this thing again is FULLY XHTML complaint as little changes here or there keeping blowing off the validation.
I'm very sorry - but I happen to be the culprit in removing the visible/display copyright notice from the code - although the copyright that appears at the begining of each script remained 100% intact and unchanged.

It was originally done just for display on my personal site and since none of my members have anything to do with programming/coding, nor could they ever afford ubbthreads software and would normaly opt for a freebie forums software if they felt like creating another specifically targeted resource such as what I currently run - i felt that having three lines of copyrite code display at the bottom of the page wouldnt be usefull to my members and may also look quite messy in presentation.

There was no intent in stealing your work - infact I saw your work as so great, that a few weeks after installing it and making so many display updates to it, I came to the conclusion that others would benefit from my small contributions/updates. So I re-uploaded it here, keeping all of your coded copyright notices intact and also including your original files into the archive.

All while doing that and finding that some of my additions to your code needed to be polished so they would work on everyone else's setup and their uniqueness (as mine was also quite unique), that I totally forgot to replace your visual copyright notices back into your scripts before redistributing them.

it was completely unintentional and i sincerely apologize for whatever frustration it may have caused you... that was not my intention - but i hope that this explanation of event sequences makes everything much more clear as how we got where we are now
Can you please verify the structure of this .zip file? There are several copies of each file in different trees, and it's kind of confusing.

Thanks!
One thing I noticed was with the latest code (I think it is, anyway), there is no ability to edit descriptions for Categories. I noticed this when I figured out that my w3t_links_categories table did not have a cat_desc field (probably missed when upgrading from an older version of this mod.). That, in turn, caused the Category display to indent the first line of sub-cats kind of strangely.

Long story shortened: I changed some of the code in links_show_cat.php to account for an empty description. So, around line 161, make this change:
Code
<br />    # Make sure we have something to print.<br />    if ($i <= $Numberofcats) {<br />                print "<br />                        <td valign=\"top\"><img src=\"{$config['phpurl']}/images/folder-c.gif\" alt=\"\" /> <font size=\"2\"><b><a href=\"links.php?op=List_Links&amp;cat_id={$cats['cat_id']}&amp;parent_id={$cats['parent_id']}&amp;title={$cats['title']}\"><u>{$cats['title']}</u></a></b></font><br />";<br />                if (empty($cats['cat_desc'])) {<br />                        //print "No Description.<br />";<br />                } else {<br />                        print "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font size=\"1\">{$cats['cat_desc']}</font><br />";<br />                }<br />


Is the ability to add/modify category descriptions supposed to be there? Or should I add it in myself?

Thanks for all your hard work!
Category descriptions were commented out by id242

You might want to view this thread first

https://www.ubbdev.com/forum/showflat.php/Cat/0/Number/101624
Okay, that makes more sense then. It was trying to print them out, but there was nothing there (though I did check the last version of the create_tables call and the column was there...). So for now, I will continue to edit the descriptions manually via mysql-front and work on an editing interface when time permits... if noone beats me to it. BTW, here's what it looks like right now, when you have descriptions to print show (and when there are none available): My Links Page

enjoy!
I actually spent some time on what you said today since Mark is back in action.

I added the capacity to add category descriptions and edit them in the links admin. Only changed file was links_admin.php

Before you could only add descriptions via phpmyadmin.
No offense taken, id242. It just caught me wrong at first. I appreciate you taking the time to provide some aesthetic improvements to the script, as mostly what I was doing when I first began the script was to get the inner workings of the code going. That's why it was released as a beta version anyway. Unfortunately I had to drop work on it for personal reasons.

I like Omegatrons idea of configuring the script to either display, or not, the notice. Someone suggested (forgive my memory, it's great but recall tends to be a problem ) possibly putting a link for a PayPal donate for those who wish to contribute. I may do that.

I do appreciate the kind words that people do like the script. That's rewarding in itself.

Anyway, I will be working on the script to further enhance it's usefulness to the community, so with that in mind here is a very short list of what I want to do first.

First and foremost will be the install script. It's pretty ugly due to the errors when you first install the script, so I'll be adding a check to see if there is a db installed yet or not. I think maybe a version check somehow is in order for upgrading from previous versions is in order.

Category descriptions should be the next to follow. It's apparent that Chuck (Omegatron) has already done something with this?

Paginating. Now the way it is written, if you have a zillion links they would all display on one page. So that needs to be addressed.

A configuration script for setting options needs to be written as well. I was thinking of using a db table for this to hold the variables. Any thoughts on this?

Of course, improvement on the admin script.

That's enough for now. Obviously, all input is requested. Thanks.
[]Omegatron said:
I actually spent some time on what you said today since Mark is back in action.

I added the capacity to add category descriptions and edit them in the links admin. Only changed file was links_admin.php

Before you could only add descriptions via phpmyadmin. [/]

Chuck, since you did this, did you update the first post? Actually, maybe you can provide just the links_admin as a .txt and I'll grab it.
The first post my friend was updated.

I think id242 added the description table but never made the ability to edit them via the script

For the record I have done the following on the script

1.XHTML corrections
2. Added ability to delete cats
3. Added ability to edit and add category descriptions
4. Added the copyright text in a configurable variable.
Only thing I really need is the subcats sorted for the drop down list when adding links, so my users can pick the correct spot to add the links. I have resorted to making mini alphabet prefixes to the subcats to get them below catagory names. Looks terrible and functions barely.
Thanks for all the hard work on this its a great addon.
Thanks Chuck, I'll be sure to add the probper credits.
[]Smilesforu said:
Only thing I really need is the subcats sorted for the drop down list when adding links, so my users can pick the correct spot to add the links. I have resorted to making mini alphabet prefixes to the subcats to get them below catagory names. Looks terrible and functions barely.
Thanks for all the hard work on this its a great addon. [/]

Could you clarify this for me? I think what you are saying is the drop down list should look something like:

Cat 1
Subcat 1
Subcat 2
Subcat 3
Cat 2
Subcat 1
Subcat 2
Subcat 3

etc.?
Posted By: MattyJ Re: TLD Bv1.5 Released - Threads Links Directory - 01/12/2004 11:07 PM
Chuck,

that worked beautifully! And the .zip looks much cleaner now, too! Thanks for updating it all!
No problem that really is the work I have done on this mod is when someone wants something I went in and coded it
yes fishtails exactly But right now it sorts alphabetically with all cats and subcats included together
On the to do!
Hi,

Since you are updating your to do list

Not certain if you saw my post a while back:
----------------------------------------------
Hi,

This hack could be a nice way to make some additional ad revenue. What I was thinking about was to allow sites / companies that you link to to upgrade their link, for a fee or free (up to you I suppose).

This upgrading could be a different style to the link (i.e. larger font / bolder / italics) or even a small banner displayed next to or below the link.

It would be even better if we could add different levels of priority to the links (each with a different style associated to them) and then sort the list on links by priority first before alphabetically.

How much work would it be to add these features?

Sanuk!
----------------------------------------------
[]ksanuk said:
Hi,

Since you are updating your to do list

Not certain if you saw my post a while back:
----------------------------------------------
Hi,

This hack could be a nice way to make some additional ad revenue. What I was thinking about was to allow sites / companies that you link to to upgrade their link, for a fee or free (up to you I suppose).

This upgrading could be a different style to the link (i.e. larger font / bolder / italics) or even a small banner displayed next to or below the link.

It would be even better if we could add different levels of priority to the links (each with a different style associated to them) and then sort the list on links by priority first before alphabetically.

How much work would it be to add these features?

Sanuk!
---------------------------------------------- [/]

What I was thinking in terms of this would be a google or ask.com style, where sponsored links would be at the top seperated with a hr or in a sidebar. This, of course is a little further down the to do list though, but definitely on the list.

Thanks for the idea.
UBB Threads version 6.4
1st Time Installing this Integration
------------------------------------

Uploaded the files...then went to the links.php file through the net and clicked on Admin so that I could add the Categories. I got this:

--------------------
SQL ERROR: Unable to do_query: SELECT * FROM w3t_links_links WHERE approved = '0' ORDER BY 'date_added'
Table 'smoknz28_Infopop.w3t_links_links' doesn't exist
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/smoknz28/public_html/ubbthreads/links_admin.php on line 74


SQL ERROR: Unable to do_query: CREATE TABLE w3t_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) )
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 ''', cat_order tinyint(10) NOT NULL defaDatabase tables have been created. You can now add categories and links.
---------------------

How many tables is this integration suppose to add to the database?

I'm getting errors after running this and just trying to verify a few things.

When I attempt to navigate around within this integration I get:

-----------------
SQL ERROR: Unable to do_query: SELECT * FROM w3t_links_categories WHERE parent_id = '0' ORDER BY 'cat_order'
Table 'smoknz28_Infopop.w3t_links_categories' doesn't exist
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/smoknz28/public_html/ubbthreads/links_show_cat.php on line 66
There are currently 0 links in our database
------------------------------------
Ran into the same issue myself. First, drop the two tables it created in phpMyAdmin. Then look in links_admin.php and replace the create table w3t_links code, (found around line 488), with:

CREATE TABLE w3t_links_categories
(
cat_id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
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'
)

Now run the install script again.

I think I read that fishtails is planning to update the install script when time permits.

Jason
Hi,

"What I was thinking in terms of this would be a google or ask.com style, where sponsored links would be at the top seperated with a hr or in a sidebar. This, of course is a little further down the to do list though, but definitely on the list."

That would work for me

Sanuk!
I like the other feature suggestions that have been made (adding a small banner for some sites, auto-populating which category a link should be in based on which one you're located in, etc...), but the one thing I haven't seen yet is a 'Report broken link' feature... not too difficult. Could probably even be a PM to the Administrator or something....? Does anyone else need this?
Dumb question from *greenie* here. Which file do I alter in order to change the default font for links listings? They currently display in 12pt/10pt arial; I'd like to make it verdana or tahoma.

Thx!
[]Sky YYZ said:
Dumb question from *greenie* here. Which file do I alter in order to change the default font for links listings? They currently display in 12pt/10pt arial; I'd like to make it verdana or tahoma.

Thx! [/]

links_show_links.php around line 180. Eventually all of the script will be based on the css.
[]Sky YYZ said:
Ran into the same issue myself. First, drop the two tables it created in phpMyAdmin. Then look in links_admin.php and replace the create table w3t_links code, (found around line 488), with:

CREATE TABLE w3t_links_categories
(
cat_id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
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'
)

Now run the install script again.

I think I read that fishtails is planning to update the install script when time permits.

Jason [/]

Worked....thanks.
Matty good idea.. as my directory gets populated it will be needed.
Hi,

Found a small bug in the Top Rated links script. While the averages are calculated correctly, the links are ordered on total amount of points they have received.

This means that a link with 3 times a 1 star rating will appear before a link with once a 5 star rating.

Anyway, obviously not a major issue, but figured I'd point it out anyway.

Sanuk!
I am just starting a threads driven site and had a question about TLD. I have it installed and I can't seem to make a sub folder.

1. I go to the TLD panel
2. I click on ADMIN
3. I click on "Show Categories"
4. I enter a new category in the box where it says ""Add Sub Category"
5. The category gets added, but not as a sub categrory, it is a top level category.

What am I doing wrong?....
Line 201 of links.php looks like this

VALUES (0, '$title', '$description')

change to this:

VALUES ('$parent_id', '$title', '$description')
I installed this for him last night.

I just applied this fix for you.

The file was actually links_admin.php

Thanks.
Duh yeah I hate typos. Thats the file I meant.
Yeah, I knew what you meant, just thought I'd post in case anyone else wanted to make the fix to their copy.
Wow, four posts in an hour...

Thanks Josh! I didn't want to bother you with it... I just assumed it was operator error.

By the way, do you ever sleep. I went to bed at midnight and you installed Chat and Links after that. Thanks for the hustle!

Grant
LOL

I never sleep.

But I dream of someday being able to sleep.
The directions lost me here.

Add a link to your menu to go to http://www.qualityfishing.net/ubbthreads/links.php .

where do I add this link, to what menu?
Well you add it in your UBBTHREADS templates ubbt_registerednav.tmpl and ubbt_unregisterednav.com

Now I visited your links. You might want to run the create table for links. Or if you problem was the creation of that one table you can go a few posts up and get the updated command.
I forgot to add the comment that you are dealing with a dork so type slowly, and clearly . ; )

I don't see were to add it in my trnp files ubbt_registerednav.tmpl and ubbt_unregisterednav.temp I don't see anything in there for links, What should it look like?

Also, you say I should also run the create table for links. How do I do that?
Steelhead, Mmmm....hey, don't try taking any titles away from me!! I'm the biggest numb-nutt when it comes to this php schtuff.... But with time and patience from the many others who've helped me....I'm slowly learning.

I'm not sure that you and Chuck are on the same sheet of music here and to be quite honest...you have lost me as well...but hey, it doesn't take much to lose me on this schtuff. It almost sounds like you are trying to figure out how to add links to your database. However, if that is not the case...then what Chuck is refering to is that if you want to make life a bit easier on your members and would like to integrate a link to your top menu for them...then you would need to add the hyperlink so that they can click on it so it can bring them to the TLD.

If that is what you're trying to do...then go to:

ubbthreads/templates/default/

Open ubbt_registerednav.tmpl (this is the menu bar that your registered users will have available to them)

Edit this file adding the following code somewhere in between your other links:

·
<a href="http://www.qualityfishing.net/ubbthreads/links.php" target="_top">Links</a>


Next, you'll need to open and edit:

ubbt_unregisterednav.tmpl (this is the menu bar that your unregistered users will have available to them)

Edit this file adding the following code somewhere in between your other links:

·
<a href="http://www.qualityfishing.net/ubbthreads/links.php" target="_top">Links</a>
thanks
You're welcome...yea, looks like you are up and running.
Yeah he had the same problem alot of people had the category table did not get created for Links.
Chuck fixed me.
Thanks again Chuck

Dan
Fellow Threadaffficianados,

I am sitting here populating a new threads driven website. I am using the TLD mod. I am trying to add a URL that starts with "https://" instead of "http://" Apparently TLD automatically adds "http://" to the beginning of any string you add in the input form. "http://" is already in the box, but if I delete it out and enter the "https://blahblah blah.com" link it gets "http://" added to the beginning with ain't gonna work.

Is this a limitation of TLD or am I doing somethnig wrong. Is there a way to mod this mod to allow me to put in any URL I want... I am sure this feature was put in to cut down on non legit URLs but it is blocking a way to eneter "https://" which is legit...

Thanks for the great wotk FishTails!
Actually, I never even thought about https for secure connection! I'll consider this a bug, and will look into it further. Meanwhile, if you have a link with the https, you should be able to add it directly via phpmyadmin. When the links are called from the database, it does not check for https or http, etc. Only when a link is submitted is it checked for valid URL, and as I said, I never took this into consideration when I started TLD.

edit

Just a note, it's just a matter of changing the regexp on the submit_link.php script.
FishTail,

Yep, you don't see a lot of them (https://) but they are out there.

Maybe an update in the future that lets submitter pick between "http://" or "https://" or let them enter the entire URL and then check it again these two protocols and kick back an error message if they attempt to add a bad URL string.

I took a quick look at the file you referenced. I think I will wait and see if you add this tweek in a future update. I am not in a hurry. It would just be nice to be able to add these links.

Thanks again for making this cool mod!

Later...
This is what you need to change:
Code
<br />                 if (strstr($url, "http://") === false)<br />                        {$url = "http://".$url;}<br />


I just don't know how it would need to be altered.
I can't get .asp files to add.
I noticed it still isn't running correctly without register globals enabled. I made a few fixes that got it limping along, but haven't done an exhaustive search to make sure all the functionality is working. I wanted to post to find out if one of the maintainers was already doing it before I dug around anymore.

Lee
Post deleted by Pasqualist
This my first installation of this add-on. I installed it from the attachment on page 1, but when I bring up links.php, I get the following errors:

[]SQL ERROR: Sun, Feb 29 2004 14:01:06 +0100 Unable to do_query: SELECT lid,cat_id FROM w3t_links_links WHERE approved = '1'
Table 'pasqual_cznet.w3t_links_links' doesn't exist
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/pasqual/tsjechie.net/forum/links_show_cat.php on line 46
SQL ERROR: Sun, Feb 29 2004 14:01:06 +0100 Unable to do_query: SELECT * FROM w3t_links_categories WHERE parent_id = '0' ORDER BY 'cat_order'
Table 'pasqual_cznet.w3t_links_categories' doesn't exist
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/pasqual/tsjechie.net/forum/links_show_cat.php on line 66[/]

Ok, I understand.. no tables have been created so far, so I follow the admin link...

Another SQL error comes up:

[]SQL ERROR: Sun, Feb 29 2004 14:03:01 +0100 Unable to do_query: SELECT * FROM w3t_links_links WHERE approved = '0' ORDER BY 'date_added'
Table 'pasqual_cznet.w3t_links_links' doesn't exist
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/pasqual/tsjechie.net/forum/links_admin.php on line 74 [/]

Ok, since this is my first installation of this add-on, I click you can do so by clicking here.

The following 2 errors come up:

[]SQL ERROR: Sun, Feb 29 2004 14:05:08 +0100 Unable to do_query: SELECT * FROM w3t_links_links WHERE approved = '0' ORDER BY 'date_added'
Table 'pasqual_cznet.w3t_links_links' doesn't exist
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/pasqual/tsjechie.net/forum/links_admin.php on line 74 [/]

and

[]SQL ERROR: Sun, Feb 29 2004 14:05:08 +0100 Unable to do_query: CREATE TABLE w3t_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) )
You have an error in your SQL syntax near ''', cat_order tinyint(10) NOT NULL default '0', ' at line 8Database tables have been created. You can now add categories and links. [/]

Not exactly a smooth installation!

Anything I miss here ?
Anyone who can help me solving this ?
got a link to your install?
Post deleted by Pasqualist
Your tables do not exist try these through phpmyadmin

CREATE TABLE `w3t_links_categories` (
`cat_id` int(11) NOT NULL auto_increment,
`parent_id` int(11) default NULL,
`title` varchar(50) NOT NULL default '',
`cat_order` tinyint(10) NOT NULL default '0',
`cat_desc` varchar(60) default NULL,
PRIMARY KEY (`cat_id`)
) TYPE=MyISAM AUTO_INCREMENT=0 ;

CREATE TABLE `w3t_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`)
) TYPE=MyISAM AUTO_INCREMENT=0 ;

CREATE TABLE `w3t_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`)
) TYPE=MyISAM AUTO_INCREMENT=0 ;

I dumped these from my working install
Thanks Chuck!

I created the tables and the links page loads fine now. But while testing the script, I encountered a problem:

It will not create subdirs! When I create a subdir, it just creates a main dir... very weird. Any idea ?
Maybe the file attached got reverted somehow. I know I had made some changes and included them on Marks direction and one of the things I did is include it. Maybe I will try and get a quick minute and zip up my php files for you to try.

email me at [][email protected][/] and I will send them to you.
subdir? Are you pertaining to categories and sub-categories? Basically, first you create the main cats, then to the right of each top level category in the admin there is another box to the right to create sub-directories.
Fellow Threadafficianados,

About 6 weeks ago I brought up the point that TLD will not allow a "https://" link to be added. There was some discussion and the only real advise to edit links_submit.php. Bottom line, I am not all that sharp with php and would love more specific help.

So how can I get TLD to either allow "httpXXXXX" or allow anything and let the URL confirmation part catch the bad URLs.

I think I need to do something with these lines...

// Let's make sure the url format is correct
if (strstr($url, "http://") === false)
{$url = "http://".$url;}
// Is the url valid and can we read it
if (@fopen($url, "r"))

...but I have been monkeying around with this for a couple of hours to no avail.

Help!...Pweese
Well I don't know this mod not using it but I may take a look later but based off your code have you tried

// Let's make sure the url format is correct
if (strstr($url, "https://") === false)
{$url = "https://".$url;}
// Is the url valid and can we read it
if (@fopen($url, "r"))

to see if it at least passes the https:// addresses? if not there may be something else in the code stopping it.
I tried that change and it still kicks out an error message. There must be more coding that checks the URL. There are about 5 php files with this mod.
I think the problem lies within the fact that https is for secure connections, and the script is trying to open the file for reading only. I'll look into this more and see if I can come up with a more definitive answer. I've been working on some other parts of the script and forgot.
Thanks in advance for the help!

The mod works great in all other ways

PS I think you are right about part of the problem is not being able to open a https:// link for validtion. I was adding another link to TLD that is a standard http:// link. It kept coming up as a bad URL. I could visit the URL manually with no problem. I then noticed that the http:// page was redirecting to a https:// page. So it is a two headed issue. One is allowing https URLs to be entered into the system and the other is validating the https URLs.

Later..
Posted By: shortbus any way to change the url? - 03/10/2004 6:55 AM
(man this is a long thread)

There is a site similar to mine, that has A LOT of 1st place/top 10 rankings for nearly all the terms of it's links db's subcategories. All the indexed and ranked links are from the links section.

My question is, is there a way to make TLD spider friendly?

If the answer is yes, there are $ signs involved. (as in, I'd pay someone to hook me up with it) Thanks.
Posted By: fishtails Re: any way to change the url? - 03/10/2004 2:23 PM
Spider friendly is definitely on the list, but considering where I am in the script it may be a while for that.
Posted By: AllenAyres Re: any way to change the url? - 03/24/2004 7:48 AM
With google's recent changes, this might be a significant help in search engines, specifically google - would be great if short, search-engine friendly url's are coming
Post deleted by foppen
Posted By: foppen Re: TLD Bv1.5 Released - Threads Links Directory - 04/10/2004 11:07 AM
When I call the links.php I get an error, is says its not in the right directory :
Warning: open_basedir restriction in effect. File is in wrong directory in /usr/local/psa/home/vhosts/videomontageforum.nl/httpdocs/ubbthreads/links.php on line 53

I checked but it is there!

What am I doing wrong??????
Using Threads 6.3

B.t.w My webhoster is using one of the latest PHP versions however I don't know excactly wich version it is...
To find out what version of php you're running, use a text editor and put the following lines in it:

Code
<br /><?<br />phpinfo();<br />?><br />


Save it as a .php file, upload it to your site and then browse to the file. It will tell you everything about your php setup.
Hi Fishtails,
I did that and ist says version:
PHP Version 4.2.2 and a lot of other data came up.
Is there any chance that TLD will run on my server?

I tried several setup's, I loaded up the files in the right directories, I get the admin menu but as soon as I click the 'links home' it gives an error.

I also can not make a new categorie it says: you did not enter anything, try again!

There must be something wrong here!!!! but what??????
Otherwise I asked someone from this group to install it for me?
Posted By: foppen Re: TLD Bv1.5 Released - Threads Links Directory - 04/13/2004 10:18 PM
I came a bit further!!!!
When I try to add a categorie it says: you did not enter anything, try again?

I just went to your site and checked the links page. It seems to be running fine, but of course that's not logged in and I can't see your admin panel. I have to leave town today and won't be back until Monday, so I won't be able to look further into this until I get back. I'm wondering thoug, which script you downloaded, as there were some changes done.
Thanks for youre reply,
I think I used the latest script where the logfile says:
01/04/2004 - 1.6 released
- Just a compilation of all files/fixes and features added

Well,I wait for youre return,
Have a good trip
Who can help me to install this TLD.
I have tried several setups but I can't get it to work.
Any help is highly appreciated!!!!!!!!!!!
the TLD as it is written in the latest version does not support Register Globals being off. You may want to check and see if that setting is set up that way in your php.ini if so then you will need to either turn it on (security risk) or set the variables manually in the script via Http_Post_Vars or some other method. I have not completed this yet on my site or I would upload an attachment for you.
Posted By: foppen Re: TLD Bv1.5 Released - Threads Links Directory - 04/23/2004 12:12 PM
Finally...This is the reason that it is not working for me.
Today I contacted my webhoster and they told me that 3 weeks ago they switched off Register Globals for security reasons just as you told me!

They also linked my to PHP information site but I could not find any help there. I have to make some minor changes in the TLD php code but I do not know enough about php to do that by myself.
So, if you have it fixed please send me a copy of the solution.
regards,
Foppen
Can it be that TLD V1.5 dosn't work with Threads V6.4.2 ? I use it for a while up to V6.4.1 without any problems and now after update to 6.4.2 The Links lib dosnt show any links and as Admin I m no longer able to post new links. I get an error about an illegal email adress if I try to add a link.

/edit: ok, register globals is my problem. server changed it.

/edit 2: fixed with .htaccess for the dir. If you run Apache put a .htaccess with this content in your dir where the script is: php_flag register_globals on


Posted By: Pappy Re: TLD Bv1.5 Released - Threads Links Directory - 04/29/2004 11:51 PM
I have updated the script so that it works on my site with register globals turned off. I dont think I made a lot of significant changes in functionality so here is the file if you want to test it on your own site.

Attached File
112587-links.zip  (283 downloads)
Thanks Pappy
Posted By: foppen Re: TLD Bv1.5 Released - Threads Links Directory - 05/02/2004 12:47 PM
Works OK now, Thanks verymuch for youre help!!!
Your Welcome Allen & Foppen
When I enter a description for a subcategory, the description doesn't show. Why could that be ? It does work for the main categories.
When pressing the edit button of the subcategory, the description is still there...

PLEASE help
I don't think this has been posted - but I had a client want me to modify the category list when you added a link. All the categories and subcats were jumbled together. I modified things to sort by main category, then subcategory.

Here's how.

In links_submit_form.php

Find this:
Code
<br />     $query = "SELECT * FROM {$config['tbprefix']}links_categories ORDER BY title";<br /><br />     $links_cat = $dbh -> do_query($query);<br /><br />     $total_cats = mysql_num_rows($links_cat);<br />


Change to this:
Code
<br />$query = "SELECT * FROM {$config['tbprefix']}links_categories WHERE parent_id = 0 ORDER BY title";<br />$main_cat = $dbh -> do_query($query);<br />$total_main_cats = mysql_num_rows($main_cat);<br />$cat_pulldown = "<select size=\"1\" name=\"cat_id\"> \n <option selected value=\"$cat_id\">$title</option> \n";<br />for ($y= 0; $y < $total_main_cats; $y++) {<br />	$cat_row = mysql_fetch_assoc($main_cat);<br />	$cat_pulldown .= "<option value=\"{$cat_row['cat_id']}\">&bull;{$cat_row['title']}</option> \n";<br />     $query = "SELECT * FROM {$config['tbprefix']}links_categories WHERE parent_id = '{$cat_row['cat_id']}' ORDER BY title";<br />     $links_cat = $dbh -> do_query($query);<br />     $total_cats = mysql_num_rows($links_cat);<br />	for ($x= 0; $x < $total_cats; $x++) { <br />	    $row = mysql_fetch_assoc($links_cat);<br />		$cat_pulldown .= "<option value=\"$row[cat_id]\">&nbsp;-{$row['title']}</option>\n";<br />	<br />	}<br />	<br />}<br />$cat_pulldown .= "</select>";<br />


Then in links_submit_form.tmpl

Find this:
Code
<br /><select size="1" name="cat_id"><br /><option selected="selected" value="$cat_id">$title</option><br /><br />UBBTPRINT;<br />print "\n";<br />for ($x= 0; $x < $total_cats; $x++) { //UBBTREMARK<br />     $row = mysql_fetch_assoc($links_cat);<br />     print "<option value=\"$row[cat_id]\">$row[title]</option>\n";<br />     }<br />UBBTPRINT;<br />echo <<<UBBTPRINT<br />


Change to this:

Code
<br />$cat_pulldown<br />



Seems to work fine at www.steelheader.net
Thanks for the quick reply Josh!

Unfortunately this does not solve my problem... showing descriptions from subcategories
ty
Ah - actually I didn't know the answer to your question - I just used quick reply to post my code mod.
SEO Friendly URLs would sure be nice....

If anyone can make this happen....$$$$
I did it for you.

Wasn't easy - had to edit pretty much every link thoughout the whole thing.
Any place current code (with bugfixes, etc) can be found?
Further back in the list I redid it and posted my changes in an attachment. My updates were to make it work with register globals off... There is still some bugs with the way it uses category descriptions which I do not use so I did not look deep into them...
ok, thank you
OK- to make this work with 6.5.

In links_admin.php and links_redirect.php change this:

require ("main.inc.php");


To this:

require ("./includes/main.inc.php");


And in links.php you need to change this:


require ("main.inc.php");
require ("links/languages/${$config['cookieprefix']."w3t_language"}/links.php");


To this:

require ("./includes/main.inc.php");
require ("languages/{$myprefs['language']}/links.php");
thanks for the fixes
Posted By: J.C. Re: TLD Bv1.5 Released - Threads Links Directory - 07/06/2004 9:19 PM
Anyone have problems getting sub categories to work? I enter em, but they show as main cats.
[]http://www.leetgamers.org/images/graemlins/kid_rofl.gif[/]


edit.
I swear I thought he was talking about subforums in threads.DOH!
Posted By: J.C. Re: TLD Bv1.5 Released - Threads Links Directory - 07/07/2004 5:46 AM
Got it fixed. Thanks MattyJ!
Not a problem... glad that cleared it up!
what? something you might wanna share?
Allen,

actually, I just sent him copies of my files... I'm pretty sure there was some fix I did a while ago to the links_show_cat.php file that enabled the sub-cats showing on the main index.... but it was so long ago, it was easier for me just to send JC my files.

You can see what mine looks like at http://www.mattreinfeldt.com/

hth.
I see
I just installed Links v1.5 to my UBB.Threads v6.4, and I am having the same problem that Pasqualist had. What I don't understand is, what do you mean by "Your tables do not exist try these through phpmyadmin"? How or where do I find this phpmyadmin?

[]Omegatron said:
Your tables do not exist try these through phpmyadmin

CREATE TABLE `w3t_links_categories` (
`cat_id` int(11) NOT NULL auto_increment,
`parent_id` int(11) default NULL,
`title` varchar(50) NOT NULL default '',
`cat_order` tinyint(10) NOT NULL default '0',
`cat_desc` varchar(60) default NULL,
PRIMARY KEY (`cat_id`)
) TYPE=MyISAM AUTO_INCREMENT=0 ;

CREATE TABLE `w3t_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`)
) TYPE=MyISAM AUTO_INCREMENT=0 ;

CREATE TABLE `w3t_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`)
) TYPE=MyISAM AUTO_INCREMENT=0 ;

I dumped these from my working install [/]
Posted By: MattyJ Re: TLD Bv1.5 Released - Threads Links Directory - 07/09/2004 10:57 PM
Bob,

there are different ways of accessing your MySQL tables, it just depends on your host and how it's all set up. On all the sites I run, I am able to access phpmyadmin from the cpanel. If you can't find it there, you can download it from http://www.phpmyadmin.net/home_page/ and follow the installation instructions. Make sure to put some security controls on the directory you install it to, though (.htaccess file). Or you can go download MySQL-Front 2.5 from http://www.bumpersoft.com/Programming/Databases_and_Networks/Review_982_index.htm (you have to allow remote access to the database to get this to work...). Either one will work for you. There are other options as well, I'm sure. Those are just the two most convenient ones for me.
Thank You MattyJ!
Isn't the lastest and greatest release of this mod supposed be included in the first post. I thought that was the protocol. I am having the same issue where adding sub categories become catagories. Does anyone have the fix?
no reason us admins shouldn't see this as well... so, in links_admin.php, change the edit_link function to be the following:
Code
<br />function edit_link() {<br />    GLOBAL $lid,$dbh,$config;<br />                <br />    $query = "<br />       SELECT *<br />       FROM {$config['tbprefix']}links_links<br />       WHERE lid = '$lid'<br />    ";<br />    $result = $dbh -> do_query($query);<br />    $row = mysql_fetch_assoc($result);<br />    $tCatId = $row['cat_id'];<br />    $query = "<br />	SELECT title<br />	FROM {$config['tbprefix']}links_categories<br />	WHERE cat_id = '{$tCatId}'<br />    ";<br />    $mth = $dbh -> do_query($query);<br />    list($tTitle) = $dbh -> fetch_array($mth); <br />    $dbh -> finish_sth($mth);<br />    $query = "SELECT * FROM {$config['tbprefix']}links_categories WHERE parent_id = 0 ORDER BY title";<br />    $main_cat = $dbh -> do_query($query);<br />    $total_main_cats = mysql_num_rows($main_cat);<br />    $cat_pulldown = "<select size=\"1\" name=\"cat_id\"> \n <option selected value=\"{$tCatId}\">{$tTitle}</option> \n";<br />    for ($y= 0; $y < $total_main_cats; $y++) {<br />	$cat_row = mysql_fetch_assoc($main_cat);<br />	$cat_pulldown .= "<option value=\"{$cat_row['cat_id']}\">&bull;{$cat_row['title']}</option> \n";<br />	$query = "SELECT * FROM {$config['tbprefix']}links_categories WHERE parent_id = '{$cat_row['cat_id']}' ORDER BY title";<br />	$links_cat = $dbh -> do_query($query);<br />	$total_cats = mysql_num_rows($links_cat);<br />	for ($x= 0; $x < $total_cats; $x++) {<br />		$results = mysql_fetch_assoc($links_cat);<br />		$cat_pulldown .= "<option value=\"$results[cat_id]\">&nbsp;-{$results['title']}</option>\n";<br />	}<br />    }<br />    $cat_pulldown .= "</select>";<br /><br />    print "<br />        <form action=\"links_admin.php?op=process_edit_link\" method=\"POST\"><br />        <input type=\"hidden\" name=\"lid\" value=\"$lid\"><br />        <table border=\"0\" cellpadding=\"2\" cellspacing=\"2\"><br />        <tr><td align=\"right\"><b>Select Category:</b></td><br />        <td><br />	$cat_pulldown<br />    ";<br />    print "<br />        </td><br />        </tr><br />        <tr><td align=\"right\"><b>URL:</b></td><td><input name=\"url\" size=\"40\" value=\"$row[url]\" /><br />        </td></tr><br />        <tr><td align=\"right\"><b>Title:</b></td><td><input name=\"title\" size=\"40\" value=\"$row[title]\" /><br />        </td></tr><br />        <tr><td align=\"right\"><b>Description:</b></td><td><textarea name=\"description\" rows=\"3\" cols=\"40\">$row[description]<br />        </textarea></td></tr><br />        <tr><td align=\"right\"><b>Submitted By:</b></td><td>$row[name]<br />        </td></tr><br />        <tr><td align=\"right\"><b>Email:</b></td><td>$row[email]<br />        </td></tr><br />        <tr><td></td><td><input type=\"submit\" name=\"edit_link\" value=\"Edit Resource\" /><br />        </td></tr><br />        </table><br />        </form>";<br />}<br />


I think the selected item code could be a little cleaner, but it seems to be working for me...

Enjoy!
[]ekempter said:
Isn't the lastest and greatest release of this mod supposed be included in the first post. I thought that was the protocol. I am having the same issue where adding sub categories become catagories. Does anyone have the fix? [/]

I fixed this in links_admin.php in function add_sub_cat.

Change:
$query = "INSERT INTO {$config['tbprefix']}links_categories
(parent_id, title, cat_desc)
VALUES (0, '$title', '$description')
";

To:
$query = "INSERT INTO {$config['tbprefix']}links_categories
(parent_id, title, cat_desc)
VALUES ('$parent_id', '$title', '$description')
";

I also found that if you had sub categories but no category description the first sub category was needlessly indented. To resolve this, I added a <br /> to links_show_cat.php

Change:
# Make sure we have something to print.
if ($i <= $Numberofcats) {
print "
<td valign="top"><img src="{$config['phpurl']}/images/folder-c.gif" alt="" /> <font size="2"><b><a href="links.php?op=List_Links&cat_id={$cats['cat_id']}&parent_id={$cats['parent_id']}&title={$cats['title']}"><u>{$cats['title']}</u></a></b></font><br />      <font size="1">{$cats['cat_desc']}</font>
";

To:
# Make sure we have something to print.
if ($i <= $Numberofcats) {
print "
<td valign="top"><img src="{$config['phpurl']}/images/folder-c.gif" alt="" /> <font size="2"><b><a href="links.php?op=List_Links&cat_id={$cats['cat_id']}&parent_id={$cats['parent_id']}&title={$cats['title']}"><u>{$cats['title']}</u></a></b></font><br />      <font size="1">{$cats['cat_desc']}</font><br />
";

The email that is sent needs to be changed to use the From e-mail addresss specified within the config settings 'contact email address' field. I didn''t have time to fix this one.

I'm sure that others would appreciate it if the first fix was included in the release.

HTH.
Posted By: J.C. Re: TLD Bv1.5 Released - Threads Links Directory - 07/17/2004 4:24 AM
Anyone have this problem, links waiting for approval, are approved, but do not show....???
did you check the cat_id of the ones you approved?
links_show_cat.php script does not count the links within main categories. The attached script revises this in v 1.5.

Attached File
116862-links_show_cat.zip  (42 downloads)
hey guys, i get this problem after i've installed it.

Warning: main(main.inc.php): failed to open stream: No such file or directory in /home/fordmond/public_html/ubbthreads/links.php on line 52

Fatal error: main(): Failed opening required 'main.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/fordmond/public_html/ubbthreads/links.php on line 52


yep, i have searched these forums, but all i get are sql errors from threadsdev when submitting it, weird.
Posted By: J.C. Re: TLD Bv1.5 Released - Threads Links Directory - 07/22/2004 5:29 AM
Okay got the last prob fixed. Any ideas how to get WOL to show the links sections properly?
Posted By: J.C. Re: TLD Bv1.5 Released - Threads Links Directory - 07/22/2004 8:54 PM
*bump*
Posted By: Pappy Re: TLD Bv1.5 Released - Threads Links Directory - 07/23/2004 10:19 AM
What is WOL?
it's short for, "Who's Online".
hehe ok thanks
Posted By: Zarzal Re: TLD Bv1.5 Released - Threads Links Directory - 08/01/2004 10:46 PM
I guess its time for a new thread for this add on with an actual file attached to it.
Post deleted by ekempter
Posted By: Zarzal Re: TLD Bv1.5 Released - Threads Links Directory - 08/02/2004 12:16 AM
you can edit the link as Admin by clicking on the green LED button. The red one will delete the link.
* Arrgh tables!
It looks like you are trying to create tables which already exit.
Have you already used this mod? If so you don't need to create the tables, they should already be there.
Posted By: Calpy Re: TLD Bv1.5 Released - Threads Links Directory - 08/05/2004 12:16 AM
[]http://www.calpernia.com/ubbthreads/images/icons/grnlite.gif[/]
* Hi all. Love the idea of this mod, I modded a very simple guestbook script to do something similar in a much less cool way, looking forward to replacing it with this. After several tense hours of struggling to install the five different versions of this script linked in this thread and guess which fixes applied to which version, I got something up and running, but upon trying to add a link I get this message:
[] -- Your email address does not appear to be valid. Please check the format and try again[/]
* I don't need it to validate email anyway since it's using the email on record for the user, but I suspect the issue is the globals thing that made it impossible to even submit a category until I added that get_input reference to the header. Is there a similar ref I can put into the links_submit to keep these variables from blanking out?
* As someone suggested, it would be a good idea to remove the non-working attachments here, at least. This is such a good mod it seems that lots of people want to try and use it.
The links_submit_link script doesn't like caps in email addresses. Like you said, there isn't a reason for it to be validating the email address anyway so I took mine out.

Under: // Check to see if the form was filled out completely
Comment out (//) the following -
From: if (!valid_email($email))
To: } (right after exit which is approx 4 lines down).
Ok so admittedly I am probably getting carried away with this script but I can't seem to leave it alone. The attachment contain the following mods:

1. Fixed the default rate in the 'rate this link' page to default to 1. It currently defaults to blank. I think the author intended it this way but made a typo.
2. Added a configurable option to allow / disallow the link submitter from voting on his/her own link.
3. Added a configurable option to specify the minimum number of votes required before a link will appear on the Top Rated page and before the 'stars' ratings will appear next to a link.
4. When a link submitter clicks on his/her link, it is no longer counted as a hit.

I'm going to try to leave this alone now but I'm not crazy about the way that the redirect sends the link in the clear.

Attached File
118140-TLD.zip  (243 downloads)
So, does the first post in the thread contain the very latest release?

I tried to install this mod when it was still "new" and had errors everywhere. lol.

But since everyone is getting it working and you devoted some time to it, I might have to give it a go again...
[]DrChaos said:
So, does the first post in the thread contain the very latest release?

I tried to install this mod when it was still "new" and had errors everywhere. lol.

But since everyone is getting it working and you devoted some time to it, I might have to give it a go again... [/]


ditto!
I think the first post is the latest (it's what I started with). Did it error out before or after you added my mods? You may need to include the other mods that I included in this thread. What kind of errors are you getting? Seems like this thread should me in the mods forum.
I was just wondering if there was one zipped file that had all the fixes. I installed it a long time ago. But as I read the post it seems that few people got it to work with your help.
I'll try and zip up what I have tonight.
I've got this far now guys
i've installed it, called up links.php and now get this error

[]
Script:
Line#:
SQL Error: Table 'fordmond_threadsdb.w3t_links_favorites' doesn't exist
SQL Error #: 1146
Query: SELECT w3t_links_favorites.uid, w3t_links_favorites.lid, w3t_links_links.lid, w3t_links_links.title, w3t_links_links.url, w3t_links_links.description FROM w3t_links_favorites, w3t_links_links WHERE w3t_links_favorites.uid = '2' AND w3t_links_favorites.lid = w3t_links_links.lid
[/]

any ideas?
i know it's something to do with tables, but i dont know how to fix it!
You're missing tables. I don't know if there is an install script with this, but if there is, it appears that it didn't finish.
hmm dang diggity.
i suppose i could add them manually via phpmyadmin yeah?
Here are my files. Sorry for the delay.

Attached File
118876-links.zip  (283 downloads)
i cant figure this out
why doesnt the install script create the tables guys?
Very appreciated Looks pretty here:

https://www.ubbdev.com/forum/links.php



I updated the original post in this thread with emkempter's files added
[]AllenAyres said:
Very appreciated Looks pretty here:

https://www.ubbdev.com/forum/links.php



I updated the original post in this thread with emkempter's files added [/]

hey allen
yours doesnt seem to be working m8.

[] Warning: main(languages//links.php): failed to open stream: No such file or directory in /home/threadsdev/domains/ubbdev.com/public_html/forum/links.php on line 55 [/]
Im trapped at the same error. I use the latest version witch runs on php5 (globals off) under 6.4.x

after Update to 6.5 I modify this:

// Require the library
require ("includes/main.inc.php");
require ("languages/${$config['cookieprefix']."w3t_language"}links.php");

to reflect the moving of the main.inc.php to the includes directory but get:

Warning: main(languages/links.php) [function.main]: failed to open stream: No such file or directory in /...path.../dragonclan-forum.de/ubbthreads/links.php on line 41

Any Idea ?
[]Zarzal said:
Im trapped at the same error. I use the latest version witch runs on php5 (globals off) under 6.4.x

after Update to 6.5 I modify this:

// Require the library
require ("includes/main.inc.php");
require ("languages/${$config['cookieprefix']."w3t_language"}links.php");

to reflect the moving of the main.inc.php to the includes directory but get:

Warning: main(languages/links.php) [function.main]: failed to open stream: No such file or directory in /...path.../dragonclan-forum.de/ubbthreads/links.php on line 41

Any Idea ? [/]
I had the same problem, but I got it working but using the full paths.

Change this:

Code
<br />// Require the library<br />require ("includes/main.inc.php");<br />require ("languages/${$config['cookieprefix']."w3t_language"}links.php");<br />


To This:

Code
<br />// Require the library<br />require ("/path/to/ubbthreads/includes/main.inc.php");<br />require ("/path/to/ubbthreads/links/languages/english/links.php");<br />


Probably not the right way to do it, but it does work.
One important update on ANYTHING that you're converting to work on 6.5 - is that you have to change

${$config['cookieprefix']."w3t_language"}

to

{$myprefs['language']}

That'll fix why it's leaving "english" out of the language file include.
Thanks Josh. Last night I do the fix with fixed path to test out where the error comes from. I know that something was changed and that is it.

To bring TLD to work on Threads 6.5 do the following changens:

links.php:
require ("./includes/main.inc.php");
require ("./languages/{$myprefs['language']}/links.php");

links_admin.php
require ("./includes/main.inc.php");

links_redirect.php
require ("./includes/main.inc.php");
i'm still getting this problem:

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

Please use your back button to return to the previous page.


how do i insert these tables?
Hmmm, even if i try the links_admin.php?op=upgrade_from_1_0 or the links_admin.php?op=create_tables manually which i've found in the links_admin.php file i STILL get the same error.
HELP!
I really want this working and it's doing my head in.
OK- I've put this on a couple of 6.5 forums. I don't have a "pretty" way to do it, or else I'd re-post the mod for 6.5.
If I find myself with free time, I will. But for now I'm swamed.

To use this mod with 6.5 - I did the following.

inks.php:
require ("./includes/main.inc.php");
require ("./languages/{$myprefs['language']}/links.php");

links_admin.php
require ("./includes/main.inc.php");

links_redirect.php
require ("./includes/main.inc.php");


Then I manually created the tables using my Threads SQL interface. The following 3 queries need to be run.

CREATE TABLE `w3t_links_categories` (
`cat_id` int(11) NOT NULL auto_increment,
`parent_id` int(11) default NULL,
`title` varchar(50) NOT NULL default '',
`cat_order` tinyint(10) NOT NULL default '0',
`cat_desc` varchar(60) default NULL,
PRIMARY KEY (`cat_id`)
) TYPE=MyISAM AUTO_INCREMENT=32 ;




CREATE TABLE `w3t_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`)
) TYPE=MyISAM AUTO_INCREMENT=11 ;




CREATE TABLE `w3t_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`)
) TYPE=MyISAM AUTO_INCREMENT=65 ;


Once you make those tweaks, and create the tables, then it should all function normally.

Probably wouldn't be difficult to figure out how to allow the admin script by the SQL error on initial install. Or create a "createlinktable.php" script which you could run first and then delete it. But the above works just fine.
Josh, your a star!
I tried copying the sql code from the file myself and enter it in the threads sql box, i guess i must have copied it slightly wrong as i got errors!
But now it's working like a treat!
thanks m8!
As I see there is a V1.8 avaible at the start posting. I take a look and its not compatible with threads 6.5 too. It use the old way for languages.

I try to change this and test out the version but I get strange results in my library. Must the DB changed if I do an Update from 1.5 to 1.8 ? Is the 1.8 compatible with php5 register global off?
hmmm... updated original post with latest bugfixes to use threads 6.5. It should run fine
Posted By: Cro Re: TLD v1.8.1 Released - Threads Links Directory - 10/12/2004 11:18 AM
hi. i have a prob. when my users submit a site, the 'date submited' shows up the same all the time.... like 01/01/70 or something like that.. i guess its something to do with the date_added in my database field. should it be null for default? what else must i make sure its adjusted? thenks
Thank you for the update, but I have still problems. I use a old 1.5 version for a long time. Some month ago someone post a version wich works with globals=off in this thread.

This version works fine for me. No problem with php5 and no big problem with ubb 6.5

After installing this 1.8.1 the links index page looks fine ( http://www.dragonclan-forum.de/ubbthreads/links.php ) but if yo try enter a section or edit a link the chaos begins.

Is a database modification needet to bring this to work again ?

/edit: I try to submit a link or create a category. Everytime I get an error that nothing is submited. I fear this version is not compatible with php globals=off

I have to put my backup in again.

Can anyone verify this ?

/edit: First bug found? In links_show_cat.php there is a $parent_id = "= $id";

in my version this is only: $parent_id = $id;
here is my version of links1.5
I do a compare between my version and 1.8.1. I use Beyond Compare and clean out all minor changes. The leftover differences are major changes between the versions. The followings files contains differences:

links.php
links_admin.php
links_rate_link.php
links_redirect.php
links_show_cat.php
links_show_links.php
links_submit_form.php
links_submit_link.php
links_submitrate_link.php
links_toprated_links.php
template/default/links_footer.php (just the copyright notice)

there are some differences in the code belongs to ' and ". I m not sure if these are the same in php so I leave it unchanged. In some places my code dont have ' ' around a value and the new one have " ". You will see it if compre it.

This pack works fine for me. Maybe this helps to find out why the new version doesnt work.

Attached File
121368-links15.zip  (259 downloads)
[]Zarzal said:
/edit: First bug found? In links_show_cat.php there is a $parent_id = "= $id";

in my version this is only: $parent_id = $id;
[/]

That does look odd, there's also:

$parent_id = "= $parent_id";

and in links_show_links.php line #124 there's:
$parent_id = "= $id";

hmmm... I'll ask
Yeah, that definately seems incorrect.

Should at least be:

$parent_id = "$parent_id";

And

$parent_id = "$id";
grazi josh

Files updated here with the 3 bugfixes
this looks better. Links 1.8.1 begins to work on my site. The main index is ok and subcats too. You can browse links without problems. But there are still 3 problems:

1) The redirector doesnt work. If you click a link I get a blank page, on top of the page a horizontal line, below that line a 'generated by Opera', thats all. Nothing happen.

[update] It seems that is related to Opera. Some Kind of protection. It work with IE.

2) You cant edit any link. If you click the green led-button to edit a link you get the edit mask but without any data. The fields are still empty.

3) If you try to submit a link you fill out the form and send it. You get an answer that 'http:// (nothing more)' isnt correct. It seems that the input from the form is not submitted to the script.

I put back may backup in again....
I can do all those tasks here... hmmm - it would have to be a difference in how servers are setup.

1.5 does all those for you?
yes, 1.5 works real fine. Little bit above I attach my files. The thing with the redirector is Opera related, my fault. But the empty Input mask must be something different. I run on ZEUS, not on Apache with php5.x

As I notice in my 1.5 there are some additional varibales in some places. If you compare you see it. I do some testings but cant find out where is the problem with the input.

I cant edit
I cant send new one
That's a little over my head. I'll look at it, but I'm not sure if I can fix it. If someone else wants to take a look first, be my guest.

Files updated with minor xhtml-bugfixes
Posted By: so01 Error when adding a category - 01/07/2005 11:29 AM
I get this error when try to add a category.

SQL ERROR: Fri, Jan 07 2005 10:29:22 +0100 Unable to do_query: INSERT INTO w3t_links_categories (parent_id, title, cat_desc) VALUES (0, 'Resa', '')
Resa was added to the database.

It worked before I switched webhotell.

Thanks
/Stefan
Just a heads up (might be in the previous 18 pages), I had to add a bunch of $tbclose's after the error messages to format the pages properly.
I combined mine with thumbshots.com to get a nice layout:

ViperAlley Resource Directory

I put a two-tiered display into place - nonmembers see the "free" thumbnail service which provides thumbnails for those sites listed in the DMOZ. My paying members see the paid service provided which provides for thumbnails of every site listed in the index.
Looks nice
I would like to make my admins control of this, so my moderators have to have links approved and turn off the delete feature for them.

Can someone tell me how to do this please?
Hey Photopost, any chance you could share how to integrate the thumbshots into TLD?
I can look at this for you if you like, it's probably easy, tho I'm not sure... been a while since I looked at the code.
[]AllenAyres said:
I can look at this for you if you like, it's probably easy, tho I'm not sure... been a while since I looked at the code. [/]

Thanks Allen
Untested:

OPEN links_admin.php

FIND:

Code
<br />// -----------------------------<br />// Make sure they should be here<br />   if (($user['U_Status'] != 'Administrator') && ($user['U_Status'] != 'Moderator')) {<br />      $html -> not_right ("You must be logged in, and be a valid administrator to access this.",$Cat);<br />   }<br />


REPLACE WITH:

Code
<br />// -----------------------------<br />// Make sure they should be here<br />   if (($user['U_Status'] != 'Administrator')) {<br />      $html -> not_right ("You must be logged in, and be a valid administrator to access this.",$Cat);<br />   }<br />
Thanks Allen, I will try that when I get home and let you know
Bit late of me

This works fine, thanks Allen
glad it worked for you
I'm not getting a setup screen which I think I should be?

Instead I get

Script:
Line#:
SQL Error: select command denied to user: 'bm3wadmin@localhost' for table 'w3t_links_links'
SQL Error #: 1142
Query: SELECT lid,cat_id FROM w3t_links_links WHERE approved = '1'

Please use your back button to return to the previous page.
Ok ive created the tables manually and its working now, although not sure why i didnt get the admin menu asking me to install and create all these?
Ah, another problem.. when submitted a new link I get

Warning: mail(): SMTP server response: 501 5.5.4 Invalid Address in g:\webs\www.bm3w.co.uk\public_html\ubbthreads\links_submit_link.php on line 93
Could not notify admin

Do we need to set an address somewhere?
Sorry Matt, on holiday. I'll check it out when I'm back home and have access to my computer (1-2 days)
[]MattUK said:
Ah, another problem.. when submitted a new link I get

Warning: mail(): SMTP server response: 501 5.5.4 Invalid Address in g:\webs\www.bm3w.co.uk\public_html\ubbthreads\links_submit_link.php on line 93
Could not notify admin

Do we need to set an address somewhere? [/]

It uses the forum's email address set in the control panel. Double-check that your forum's email address is a current legit one.
Download zip updated to 1.8.3 - a few bugs fixed


One was in the links admin where the admin viewed links submitted, the link to the username didn't work, now it does
Thank you for this Update. The V1.83 is the first version behond 1.5 that will work on my server. But the are 2 typo bugs in links_submitrate_link.php
On Line 39 and 59 you must add \ to the " around the word top or you get an error while trying to rate a link.

Good work !
Thanks for the bugfixes, download zip is updated in the first post
This mod adds search capability to TLD. Links title and description are searched and the found search term is bolded. Perhaps Allen or Josh would be so kind as to integrate my changes into the latest and greatest release because my changes may not include those contributed by other users since I last worked on this script. The integration should be minor because I only changed one script and one template. Enjoy.

Files:

links_search_links.php (new script to go with your other links scripts)
links.php (you may need to modify the path to links_search_links.php)
links_header.tmpl (this replaces links_header.tmpl in your templates/default directory)
search.gif (new icon - this goes in your images directory)

Attached File
128790-TLDLinks.zip  (253 downloads)
cool, I'll get it integrated sometime this week and release it as a 2.0


thankyou again
Added a couple of minor fixes:

Added 'no results found' message, previously no message which made you wonder if the script was working.

When bolding search results, script wasn't retaining case. Example: search for 'dallas' would return 'dallas' but it should have returned 'Dallas'.

Links no longer send the URL in the clear.

Attached File
128875-links_search_links.zip  (244 downloads)
[]ekempter said:

3. Added a configurable option to specify the minimum number of votes required before a link will appear on the Top Rated page and before the 'stars' ratings will appear next to a link.
[/]

The stars appear in the 'Most Popular' list regardless of how the configuration option is set. Fixed this. Allen, please integrate into the lastest release - this is a very small mod.

Thanks.

Attached File
128876-links_popular_links.zip  (286 downloads)
will do - thank you
Posted By: AllenAyres TLD Bv2 Released - Threads Links Directory - 08/02/2005 7:01 AM
Zip files updated with the search feature by ekempter -

A few small bugfixes to update it to work with threads 6.5+ and a url fix.

Thanks ekempter, seems to be working real well here
Posted By: Zarzal Re: TLD Bv2 Released - Threads Links Directory - 08/02/2005 10:19 PM
Thank you for this update.

After review the files your should take a look to links_popular_links.php
The header contains wrong version descriptions and in line 58 is an alt tag missing after /images/popular-c.gif\ witch was in your last update.

I have a question about your directory structure for this modification. I put he language files in the UBBt language directory so I have to edit the line

require ("languages/{$myprefs['language']}/links.php");
to
require ("./languages/{$myprefs['language']}/links.php");

in some files. There should be a note in the installation description about the directory location.

This update works very well.
thanks for the bug report, I'll update this this coming weekend with the fixes and look at the language issue too.
Fixed the alt text buglet there and in one other place - zip updated. I don't have an answer for the languages issue yet.
Posted By: Medar Re: TLD Bv2 Released - Threads Links Directory - 08/10/2005 11:44 PM
OK Gents - quick question.

I have never used TLD...and basically all I need is an online script that will handle my bookmarks. I get tired of using multiple PCs and managing the bookmarks on each, so I am going to start using my personal site to do so. Easy enough to lock away if I need.

My question is this - should I install this mod on my family's threads site and use it for my personal use, or is this a bit 'robust' for one user? I am sure there are a bunch of random non-integrated bookmark scripts out there, but figured I would start here.
this one is pretty simple to setup, bookmarks would probably be a good use for it
I just added this one to my site (after manually creating the tables). I can't get it to work -every time I submit a link I get:

You have not filled out the form completely. Please hit your back button and try again.

After digging through the scripts that erro is triggered in the links_submit_links.php file by the following code:

Code
 // Check to see if the form was filled out completely <br /> <br />	if (!filled_out($HTTP_POST_VARS)) { <br />		print "<center><b>{$ubbt_lang['LINKS_SUBMIT_FILLED_OUT']}</b></center>"; <br />		$html -> send_footer(); <br />		exit; <br />	} 


It looks like the function that checks to see if all of the $HTTP_POST_VARS are avaialble is failing. Any ideas?
good question, it could be that we should be using the same sub threads uses for form submissions
Allen please post the scripts that Threads Dev is using for this hack so I can use Beyond Compare to see what the differences are between the scripts that work here, and the ones in the mod.
we're using the same scripts you find in the first post in this topic. I updated them here when I updated the zips.
The check to see if all of the form data is filled in fails on my site: as written it's always evaluates to false.

Code
 function filled_out($form_vars)<br />	{<br />	// lets make sure that each variable has a value<br />	foreach ($form_vars as $key => $value)<br />		{<br />		if (!isset($key) || ($value == ""))<br />			return false;<br />		}<br />		return true;<br />	} 


I can re-write the function to get it to return true, but then I can't get it to fail when a form isn't filled in...
I finally figured out how to fix it -it's not pretty but it works. Since there are only 4 variables that are user selectable I decided to only check for those 4:

Code
 foreach ($HTTP_POST_VARS as $key => $value);<br /><br />// Check to see if the form was filled out completely<br />if ( (!isset($cat_id) || ($cat_id == "")) || (!isset($url) || ($url == "")) || (!isset($title) || ($title == "")) || (!isset($description) || ($description == "")) ) {<br />		print "<center><b>{$ubbt_lang['LINKS_SUBMIT_FILLED_OUT']}</b></center>";<br />		$html -> send_footer();<br />		exit;<br />	} else { 


After the else the rest of the script to check the url and enter the data in the database executes.
thanks, that's a new bug not reported before. You must be running a slightly different server setup - is it windows IIS or something?
Posted By: AllenAyres TLD Bv2.1 - Threads Links Directory - 12/26/2005 11:33 AM
Original post updated with zip to work with 6.5.2 plus some small bugfixes
Posted By: Zarzal Re: TLD Bv2 Problem after serverupdate - 07/25/2006 10:57 PM
my provider changed the webserver a little bit and my TLD2 stop working correct in some functions. It doesnt show any error.

I can enter the main page of TLD. All looks nice and correct. If I click on a category it goes to it but show only every time the same link only (only one and every time the same). It doesn't show me the correct content of the category.

I can click on what I like, I get every time the same result showing me the one and only link and the categorys. The DB contains 138 Links.

Click I 'Most Popular' I see some of my links. If I try to follow a link the redirector show me an empty page (in firefox). In IE it take me back to my board main index.

I try do delete one of the Most Popular links, got the correct message that this link is deleted but after I revisit Most Popular it is still intact and I have 138 links.

If I try to edit a category or link I get the error that not all is filled out correctly.

I can remeber that this problem have to do with global variables or something like this. Anyone who know this effect and have a solution? I like TLD and have to bring it to work again. I need some help.
Posted By: AllenAyres Re: TLD Bv2 Problem after serverupdate - 07/26/2006 6:03 AM
hmm.. got a link? And did the hosts say what they changed?
Posted By: Zarzal Re: TLD Bv2 Problem after serverupdate - 07/26/2006 9:07 AM
The host changes everything smile he replace the servermachine include the server software. From Zeus to Lightspeed.

You can take a look on my board on http://www.dragonclan-forum.de/ubbthreads/links.php

But you have to register to access this page.
Posted By: AllenAyres Re: TLD Bv2 Problem after serverupdate - 07/26/2006 4:17 PM
Strange, have you tried visiting the links admin page and submitting anything?
Posted By: Zarzal Re: TLD Bv2 Problem after serverupdate - 07/26/2006 9:40 PM
If I try to submit a link I get: http:// is not a valid url or is temporarily unavailable. Please check the url by clicking on the link and try again.

Seems be related to the post/get bug from Dalantech and maybe Threads 6.5.5 .... I changed the threads version von 6.5.4 to 6.5.5 some days bevore the server changes and not test the TLD *shame*.

/edit: I try to apply the fix for links_submit_link.php from dalantech above, but I ancounter some problems ... still working and cant find out to put it in the right place.
Posted By: Zarzal Re: TLD Bv2 Problem after serverupdate - 07/26/2006 10:21 PM
Update: I m on the way. I compare V1.5 to V2.0 and bring some old sript parts to V2. It begins to work but I guess its realy unsafe to XSS. The Links Categories shows now correect, but there is alot more work to do.

/edit: I include in most cases some code like this (example redirector):
PHP Code
 $lid = get_input("lid","get");
$url = get_input("url","get");


Index works, showlinks work, redirector work. I work on the rest
Posted By: AllenAyres Re: TLD Bv2 Problem after serverupdate - 07/27/2006 12:14 AM
good deal smile
Posted By: Zarzal Re: TLD Bv2 Problem after serverupdate - 07/27/2006 12:23 AM
Finished, but .....
The problem must be the serversetup. Different servers and different script handling. Based on TLD 1.5 I bring now 90% to work but I feel sick if I takle a look to all the get_input without any check.
This script needs a rework and I hope it will be done for ubb7. Now I have a mix of V1.5, 1.83 and V2(.1) and my user can still work with it.
Posted By: AllenAyres Re: TLD Bv2 Problem after serverupdate - 07/27/2006 3:28 AM
hehe, I think we'll be re-writing from the ground up for 7 and importing this one's data smile
Posted By: JoshPet Re: TLD Bv2 Problem after serverupdate - 08/08/2007 6:35 AM
Originally Posted by AllenAyres
hehe, I think we'll be re-writing from the ground up for 7 and importing this one's data smile

Done: https://www.ubbdev.com/forums/ubbthreads.php?ubb=showflat&Number=315098#Post315098
© UBB.Developers