View Full Version : Removing path/filename/referral in the link
Marko777
10-28-2006, 02:49 PM
Some of our members enter links in the following style:
http://www.mywebsite.com/index.php?ref=55
or
http://www.mywebsite.com/?ref=55
or taking this page as an example
http://www.vbadvanced.com/forum/newthread.php?do=newthread&f=117
Is it possible to have an option to strip anything except the domain name?
So that if the member enters:
http://www.vbadvanced.com/forum/newthread.php?do=newthread&f=117
the system will only take "http://www.vbadvanced.com/", and check if there is no simillar link already in the directory.
Some member can abuse the current system by entering the same link with different parameters at the end of it.
Thank you.
Brian
10-28-2006, 03:08 PM
That's exactly what it does. When it checks for duplicate links, it grabs the domain name and searches for any links with the same domain, and then prints an error if it finds one.
Marko777
10-28-2006, 03:28 PM
Brian, right now I have two links:
http://www.site.com/forum.php
and
http://www.site.com/index.php?p=advertise
I was able to add those two links although "Allow Duplicate Links" is set to "No"
It would be a great idea to add a general option in the admin area to strip everything after the top level domains the URL.
drewbe121212
10-29-2006, 11:40 PM
I could see how this would be a neat feature.
Myself, however, like it the way it is. My Directory is going to be a page specific directory rather then a top level domain directory. Therefore
www.site.com is allowed
www.site.com/page2.html is allowed
www.site.com/apge.php?page=whatever&var=value is allowed :)
I could definately see where other people would find this useful, but make sure it is an option specific to this as some of us need multiple pages from the same domain :)
Marko777
10-30-2006, 02:54 AM
Which is why I want it to be an option in an admin :)
PS
For some reason I cannot post in bugs folder.
There is a bug when you view top 20 new links - it shows all links having 0 replies, although some of them do have replies.
Brian
10-30-2006, 11:14 AM
My apologies for saying that's how things already work. I was thinking that's how I set things up, but apparently I was thinking of something else. I'll see if we can get an option in the next version so you can control how strict the duplicate check is.
Thanks for pointing out the problem with replies as well. I've just applied the fix to the package here, so if you'll download it again and upload the links/browselinks.php file over your existing one, that should take care of the problem.
drewbe121212
10-30-2006, 08:15 PM
Brian, I just posted this exact same problem over in the troubleshooting forum (wish i would have gotten back to this thread first).
Just as a heads up, in that exact same search where the bug is, sticky links do not take precedence over the other links.
Marko777
10-31-2006, 01:16 AM
PS
I cannot post in bugs section. Is it closed?
New sql bug:
This happened when googlebot arrived into my website. It went to
http:ww.website.com/links/showlink.php?do=showdetails&l=10&goto=previous&catid=poplinks&orderby=category
The only thing that creates a problem in this link is the "&orderby=category".
I haven't found a way for me to order my results by category, but googlebot did. This caused sql error:
Database error in vBulletin 3.6.0:
Invalid SQL:
SELECT links.linkid
FROM gadv_links AS links
LEFT JOIN glinks_categories AS links_categories ON (links.catid = links_categories.catid)
WHERE valid = 1
AND suspended = 0
ORDER BY categories.title DESC LIMIT 20;
MySQL Error : Table 'WEBSITE_forums.glinks_categories' doesn't exist
Error Number : 1146
Date : Monday, October 30th 2006 @ 11:51:30 PM
Script : http://www.WEBSITE.net/links/showlink.php?do=showdetails&l=10&goto=previous&catid=poplinks&orderby=category
Referrer :
IP Address : xxx
Username : xxx
Classname : vb_database
Brian
10-31-2006, 12:07 PM
Just as a heads up, in that exact same search where the bug is, sticky links do not take precedence over the other links.
Sticky links are not meant to take precedence in searches.
Marko - Read the forum description for the bugs forum and that should tell you why you can't post. ;)
For the SQL erorr, that should have already been fixed in the files here. If you'll download them again and replace your links/browselinks.php file with the one there, that should take care of the problem.
Marko777
11-03-2006, 08:33 AM
http://www.******.net/links/showlink.php?do=showdetails&l=7&goto=previous&catid=poplinks&orderby=category
Still gives that mysql error. I've updated all files.
Database error in vBulletin 3.6.0:
Invalid SQL:
SELECT links.linkid
FROM gadv_links AS links
LEFT JOIN glinks_categories AS links_categories ON (links.catid = links_categories.catid)
WHERE valid = 1
AND suspended = 0
ORDER BY categories.title DESC LIMIT 20;
MySQL Error : Table '******_forums.glinks_categories' doesn't exist
Error Number : 1146
Date : Friday, November 3rd 2006 @ 07:32:28 PM
Script : http://www.*******.net/links/showlink.php?do=showdetails&l=7&goto=previous&catid=poplinks&orderby=category
Referrer :
IP Address : *******
Username : *******
Classname : vb_database
Marko777
11-05-2006, 11:42 AM
Ok, I found the error:
showlink.php
line 203
original:
'LEFT JOIN ' . TABLE_PREFIX . 'links_categories AS links_categories ON (links.catid = links_categories.catid)'
should be:
'LEFT JOIN ' . TABLE_PREFIX . 'adv_links_categories AS links_categories ON (links.catid = links_categories.catid)'
line 205
original:
WHERE valid = 1
should be:
WHERE links.valid = 1
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.