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?
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".
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.
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).
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:
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.
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.
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:
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);
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:
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; }
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.
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)
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
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.
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
"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.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.