Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
adding a 2nd homepage field for purpose of picture gallery links in the profile Details »»
adding a 2nd homepage field for purpose of picture gallery links in the profile
Version: , by dv6cougar dv6cougar is offline
Developer Last Online: Jan 2004 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 03-12-2003 Last Update: Never Installs: 0
 
No support by the author.

ok here's how far i got! SOMEONE PLEASE HELP ME OUT! i know i'm so close!

now i got it to show up in the edit profile portion of user cp but it throws a database error

that goes like this

PHP Code:
 Database error in vBulletin 2.2.9

Invalid SQLUPDATE user SET birthday='0',signature='',customtitle='1',usertitl  e='The Owner of Dhis Shiz',email='dv6couga@dv6cougar.com',parentemail='',coppauser='0',homepage='http://www.dv6cougar.com/vb/memberpics/dv6cougar/dig.php,gallery='',icq='',aim='dv6cougar',yahoo='',use  rgroupid='6' WHERE userid='1
mysql error: You have an error in your SQL syntax near '
dv6cougar',yahoo='',usergroupid='6' WHERE userid='1'' at line 1 

mysql error number
1064 

Date
Wednesday 12th of March 2003 10:19:24 AM 
Script
: <a href="http://www.dv6cougar.com/vb/vb/member.php\" target=\"_blank\">[url]http://www.dv6cougar.com/vb/vb/member.php[/url]</a> 
Referer: 
now what i did was the following
PHP Code:
 //in template modify_profile 

/*************** 

FIND 

************/ 
<tr
<
td bgcolor="#1C5780"><b><normalfont>Homepage:</normalfont></b></td
    <
td bgcolor="#1C5780"><normalfont><input type="text" class="bginput" name="homepage" 
    
value="$bbuserinfo[homepage]size="30" maxlength="200"></normalfont></td
</
tr
/************** 

after it place 

***************/ 


<tr><td bgcolor="#1C5780"><b><normalfont>Gallery:</normalfont></b></td><td bgcolor="#1C5780"
<
normalfont><input type="text" class="bginput" name="gallery" value="$bbuserinfo[gallery]size="30" maxlength="200"></normalfont></td
</
tr


//IN member.php 
/*************** 

FIND 

***************/ 

$homepage trim($homepage); 
  if (
$homepage) { 
    if (
preg_match('#^www\.#si'$homepage)) { 
      
$homepage "http://$homepage"
    } else if (!
preg_match('#^[a-z0-9]+://#si'$homepage)) { 
      
// homepage doesn't match the <a href=\"http://-style\" target=\"_blank\">[url]http://-style[/url]</a> format in the beginning -- possible attempted exploit 
      
$homepage ''
    } 
  } 
   
  
/******************* 
   
  AFTER IT PLACE 
   
  ********************/ 
   
  
$gallery trim($gallery); 
  if (
$gallery) { 
    if (
preg_match('#^www\.#si'$gallery)) { 
      
$gallery "http://$gallery"
    } else if (!
preg_match('#^[a-z0-9]+://#si'$gallery)) { 
      
// gallery doesn't match the <a href=\"http://-style\" target=\"_blank\">[url]http://-style[/url]</a> format in the beginning -- possible attempted exploit 
      
$gallery ''
    } 
  } 
   
  
/************* 
   
  ON THE LINE RIGHT BELOW THE ONE ABOVE FIND IN LINE 
   
  **************/ 
   
  
homepage='".addslashes(htmlspecialchars($homepage))." 
   
  /*********** 
   
  AFTER IT INLINE ADD 
   
  **************/ 
   
  ,gallery='".addslashes(htmlspecialchars(
$gallery))." 

/************* 

FIND 

***************/ 

if ($userinfo[homepage]!="http://" and $userinfo[homepage]!="" ) { 
    
$userinfo[homepage]=$userinfo[homepage]; 
  } else { 
    
$userinfo[homepage]=""
  } 
   
  
/************** 
   
  after it place 
   
  **************/ 
    
if ($userinfo[gallery]!="http://" and $userinfo[gallery]!="" ) { 
    
$userinfo[gallery]=$userinfo[gallery]; 
  } else { 
    
$userinfo[gallery]=""
  } 
basically what i'm doing is, in member.php for every occurance of homepage i'm adding a gallery portion to it.

i also inserted the gallery field into the user table for my vbulletin board database.

any ideas? what's throwing my error? any other templates i might need to look at?

let me know please

thanks alot! before i had it set up differently, i had not added the last portion i edited in member.php and it would nto throw the db error but not add anything to the db and gallery does not show up in the view profile portion.

so if i go and view profile of me on here it would be have a homepage field and a gallery field, but gallery wouldnt' show up

__________________

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:55 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03794 seconds
  • Memory Usage 2,223KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete