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!
N Grant Swaim Administrator autotech-elearning.com
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.
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...
N Grant Swaim Administrator autotech-elearning.com
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.
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. [/]
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.
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.
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
N Grant Swaim Administrator autotech-elearning.com
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 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.
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..
N Grant Swaim Administrator autotech-elearning.com
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.
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
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...
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?
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
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.
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
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.
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...
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 />
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.