Author |
Message |
candy
Worker


Joined: Dec 21, 2004
Posts: 225
Location: Kansas City metro
|
Posted:
Wed Jul 05, 2006 6:26 pm |
|
is there a way i can have a link in the Web Links module appear in more than one category? when i go to approve a listing that has already been approved for another category, i get the following error:
Quote: | ERROR: This URL is already listed in the Database!
|
thanks! |
|
|
|
 |
kguske
Site Admin

Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Wed Jul 05, 2006 8:12 pm |
|
That's a check to prevent duplicate links (some people would submit that hoping it would help their search engine rankings). You could remove that edit from the code... |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
 |
candy

|
Posted:
Wed Jul 05, 2006 8:26 pm |
|
any idea on how to go about that?  |
|
|
|
 |
kguske

|
Posted:
Wed Jul 05, 2006 8:29 pm |
|
If you get the error message on the submit and want to allow it, look in the modules/Weblinks/index.php file and comment out the lines that perform the edit (you should be able to find the error message defined in a variable in the modules/Weblinks/language/lang-xxx.php file).
If you want to bypass the error message in the admin function, look at the modules/Weblinks/admin/index.php file for a similar error message. |
|
|
|
 |
candy

|
Posted:
Wed Jul 05, 2006 8:42 pm |
|
i want it to LET me approve a link that is already part of the database. when i go comment the above out all it does is not show the error. it is still not letting me add/approve the web link that was submitted. any ideas? |
|
|
|
 |
kguske

|
Posted:
Wed Jul 05, 2006 8:49 pm |
|
Instead of getting the error message, what happens? |
|
|
|
 |
candy

|
Posted:
Wed Jul 05, 2006 8:54 pm |
|
it shows "_ERRORURLEXIST" but doesn't show the text of "The URL already exists in the database".
This happens when i click "add" button the submitted URL in the admin panel.
How can i structure the Web Links module so that it doesn't check to see whether or not the URL is already in the database? is this in the language file too? |
|
|
|
 |
kguske

|
Posted:
Wed Jul 05, 2006 9:01 pm |
|
Sounds like you commented out the language definition, but not the edit in modules/Weblinks/admin/index.php |
|
|
|
 |
candy

|
Posted:
Wed Jul 05, 2006 9:08 pm |
|
weird...i don't have an admin folder in my public_html/modules/Weblinks folder!
anywhere else it'd be? |
|
|
|
 |
fkelly
Former Moderator in Good Standing

Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY
|
Posted:
Wed Jul 05, 2006 9:08 pm |
|
Look in /modules/web_links/index.php. There you will find the function add. It checks to see if the url already exists and if so gives the message you see.
You could program web_links to circumvent this check. I couldn't guarantee whether this might cause problems elsewhere so you'd be advised to test it somewhere where users wouldn't be affected if it goes haywire. |
|
|
|
 |
kguske

|
Posted:
Wed Jul 05, 2006 9:11 pm |
|
If you're using PHP-Nuke prior to 7.5, it could be in the admin/modules/news.php or something like that. |
|
|
|
 |
candy

|
Posted:
Wed Jul 05, 2006 9:14 pm |
|
i don't have a news.php under my admin/modules folder.  |
|
|
|
 |
kguske

|
Posted:
Thu Jul 06, 2006 4:50 am |
|
What version / distribution of PHP-Nuke are you using?
I gave you the wrong file name - sorry! It's admin/modules/links.php (I had news on the brain...). |
|
|
|
 |
candy

|
Posted:
Thu Jul 06, 2006 10:55 am |
|
i think i am using 7.4 but don't know for sure....how can i tell? |
|
|
|
 |
kguske

|
Posted:
Thu Jul 06, 2006 2:41 pm |
|
If you see admin/modules/links.php, you'll know it's not 7.5 or higher. |
|
|
|
 |
candy

|
Posted:
Thu Jul 06, 2006 3:01 pm |
|
yep, i do see it but don't know what to edit in links.php |
|
|
|
 |
kguske

|
Posted:
Thu Jul 06, 2006 4:02 pm |
|
Look for the code that generates the error message, and comment it out. |
|
|
|
 |
|