Previous Thread
Next Thread
Print Thread
Rating: 5
Page 7 of 11 1 2 5 6 7 8 9 10 11
Joined: Aug 2003
Posts: 28
User
User
Offline
Joined: Aug 2003
Posts: 28
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!


N Grant Swaim
Administrator
autotech-elearning.com
Sponsored Links
Joined: Jun 2002
Posts: 303
Enthusiast
Enthusiast
Joined: Jun 2002
Posts: 303
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.

Last edited by fishtails; 01/28/2004 8:20 PM.
Joined: Aug 2003
Posts: 28
User
User
Offline
Joined: Aug 2003
Posts: 28
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...


N Grant Swaim
Administrator
autotech-elearning.com
Joined: Jun 2003
Posts: 1,025
Junior Member
Junior Member
Offline
Joined: Jun 2003
Posts: 1,025
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.

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
I can't get .asp files to add.

Sponsored Links
Joined: May 1999
Posts: 78
Member
Member
Offline
Joined: May 1999
Posts: 78
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

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Post deleted by Pasqualist

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
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 ?

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Anyone who can help me solving this ?

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
got a link to your install?


- Allen wavey
- What Drives You?
Sponsored Links
Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Post deleted by Pasqualist

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
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

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
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 ?

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
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.

Joined: Jun 2002
Posts: 303
Enthusiast
Enthusiast
Joined: Jun 2002
Posts: 303
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.

Joined: Aug 2003
Posts: 28
User
User
Offline
Joined: Aug 2003
Posts: 28
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


N Grant Swaim
Administrator
autotech-elearning.com
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
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.

Joined: Aug 2003
Posts: 28
User
User
Offline
Joined: Aug 2003
Posts: 28
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.


N Grant Swaim
Administrator
autotech-elearning.com
Joined: Jun 2002
Posts: 303
Enthusiast
Enthusiast
Joined: Jun 2002
Posts: 303
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.

Joined: Aug 2003
Posts: 28
User
User
Offline
Joined: Aug 2003
Posts: 28
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..


N Grant Swaim
Administrator
autotech-elearning.com
Joined: Apr 2002
Posts: 610
Code Monkey
Code Monkey
Joined: Apr 2002
Posts: 610
(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.

Joined: Jun 2002
Posts: 303
Enthusiast
Enthusiast
Joined: Jun 2002
Posts: 303
Spider friendly is definitely on the list, but considering where I am in the script it may be a while for that.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
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


- Allen wavey
- What Drives You?
Joined: Dec 2002
Posts: 67
Power User
Power User
Joined: Dec 2002
Posts: 67
Post deleted by foppen

Joined: Dec 2002
Posts: 67
Power User
Power User
Joined: Dec 2002
Posts: 67
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...

Joined: Jun 2002
Posts: 303
Enthusiast
Enthusiast
Joined: Jun 2002
Posts: 303
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.

Joined: Dec 2002
Posts: 67
Power User
Power User
Joined: Dec 2002
Posts: 67
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?

Joined: Dec 2002
Posts: 67
Power User
Power User
Joined: Dec 2002
Posts: 67
I came a bit further!!!!
When I try to add a categorie it says: you did not enter anything, try again?


Last edited by foppen; 04/14/2004 9:34 AM.
Joined: Jun 2002
Posts: 303
Enthusiast
Enthusiast
Joined: Jun 2002
Posts: 303
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.

Joined: Dec 2002
Posts: 67
Power User
Power User
Joined: Dec 2002
Posts: 67
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

Joined: Dec 2002
Posts: 67
Power User
Power User
Joined: Dec 2002
Posts: 67
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!!!!!!!!!!!

Joined: Nov 2000
Posts: 210
Member
Member
Offline
Joined: Nov 2000
Posts: 210
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.

Joined: Dec 2002
Posts: 67
Power User
Power User
Joined: Dec 2002
Posts: 67
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

Joined: Jul 2001
Posts: 808
Coder
Coder
Joined: Jul 2001
Posts: 808
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



Last edited by Zarzal; 04/25/2004 2:25 PM.
Joined: Nov 2000
Posts: 210
Member
Member
Offline
Joined: Nov 2000
Posts: 210
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.
Attachments
112587-links.zip (0 Bytes, 283 downloads)

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Thanks Pappy


- Allen wavey
- What Drives You?
Joined: Dec 2002
Posts: 67
Power User
Power User
Joined: Dec 2002
Posts: 67
Works OK now, Thanks verymuch for youre help!!!

Joined: Nov 2000
Posts: 210
Member
Member
Offline
Joined: Nov 2000
Posts: 210
Your Welcome Allen & Foppen

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
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

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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

Page 7 of 11 1 2 5 6 7 8 9 10 11

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)