vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Need suport - Can't get Hacks Creator to Help (https://vborg.vbsupport.ru/showthread.php?t=48049)

JakeC 01-23-2003 07:48 PM

Need suport - Can't get Hacks Creator to Help
 
Is anyone familiar with DrkFusion's Links database hack? It's quite nice but I am having trouble with it. He is too busy working on his next release in order help figure out what is going on with my hack installation.

Basically whenever I add an apostrophe to the Title or the description of the link; the link will not be added to the database. It does not show up for moderation and therefore I don't even see it. My users are getting a little frustrated when the link that they submit does not show up in the database. Someone else was having the same problem and I tried the fix that they used but my code was different than theirs and it was not a simple cut and paste operation. Anyone have any ideas? If I need to post any code let me know. Thanks in advance.

Jake

Boofo 01-23-2003 08:04 PM

Paste just the part that is giving you trouble and I think it might just need an unhtmlcharacters in a place ot two.

JakeC 01-24-2003 09:55 PM

I'm not too sure on how to do that. Could you be more specific?

Thanks

JakeC

Boofo 01-24-2003 10:49 PM

Paste whatever part of the code that is giving you problems, in here, and I will see if I can figure out what is happening.

JakeC 01-24-2003 11:57 PM

Here is the code that seems to be at the root of the problem:

PHP Code:

// #################### Do Add New ####################
if ($HTTP_POST_VARS['action']=="doaddnew") {
if (
$catid == '0'){
    eval(
"dooutput(\"".gettemplate('drkslinks_error2')."\");");
}elseif (
$linkname == ''){
    eval(
"dooutput(\"".gettemplate('drkslinks_error2')."\");");
}elseif (
$linkurl == 'http://' or $linkurl == ''){
    eval(
"dooutput(\"".gettemplate('drkslinks_error2')."\");");
}elseif (
$linkdesc == ''){
    eval(
"dooutput(\"".gettemplate('drkslinks_error2')."\");");
}else{
 if (
$valid == '1'){
     
$vd "0";
 }else{
     
$vd "1";
 }
$result mysql_query("INSERT INTO gportal_weblinkslink (catagoryid, linkname, linkurl, linkdesc, valid) VALUES ('$catid', '".addslashes(htmlspecialchars($linkname))."', '$linkurl', '$linkdesc', $vd)");
     eval(
"dooutput(\"".gettemplate('drkslinks_doneaddlink')."\");");
}


Thanks in advance

JakeC

Boofo 01-25-2003 01:21 AM

Try changing this:

PHP Code:

$result mysql_query("INSERT INTO gportal_weblinkslink (catagoryid, linkname, linkurl, linkdesc, valid) VALUES ('$catid', '".addslashes(htmlspecialchars($linkname))."', '$linkurl', '$linkdesc', $vd)");
     eval(
"dooutput(\"".gettemplate('drkslinks_doneaddlink')."\");"); 

To this:

PHP Code:

$result mysql_query("INSERT INTO gportal_weblinkslink (catagoryid, linkname, linkurl, linkdesc, valid) VALUES ('$catid', '".addslashes($linkname)."', '$linkurl', '".addslashes($linkdesc)."', $vd)");
     eval(
"dooutput(\"".gettemplate('drkslinks_doneaddlink')."\");"); 

and let me know what you get.

JakeC 01-25-2003 01:44 AM

Still not working. It's working if the apostrophe is in the title but not the description.

JakeC

Boofo 01-25-2003 01:53 AM

You might want to try it again. I changed the code above after I posted it. You might have tried the old code. Try what I have up there now and let me know.

JakeC 01-25-2003 02:56 AM

Very cool! Thanks a bunch. Works like a charm. I appreciate it very much.

JakeC

Boofo 01-25-2003 08:35 AM

You're very welcome. ;)


All times are GMT. The time now is 08:09 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01045 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete