Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-27-2005, 09:03 AM
BoYagoob BoYagoob is offline
 
Join Date: Jan 2005
Location: Doha
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How can I edit a php file in vb3.5.0 ?

Hello,

Due to the new system used in vb 3.5.0, I would like to know how can I preform this hack used in 3.0.x to 3.5.x :

Quote:
Step 2, open usercp.php
Step 3,
---- find ----

if (!$bbuserinfo['userid'] OR !($permissions['forumpermissions'] & CANVIEW))
{
print_no_permission();
}

// main page:

---- end find ----

Step 4,
---- below add ----

// ########## start notes ############

if ($_POST['do'] == "notes")
{
$bbuserinfo['notepad'] = $_POST['notes'];
$notesql = "UPDATE " . TABLE_PREFIX . "user SET notepad = '" . addslashes($bbuserinfo['notepad']) . "' WHERE userid = $bbuserinfo[userid]";
$DB_site->query($notesql);
}

// ######### end notes ##############

---- end below add ----

Step 5, save file + close
Please, can you help me in his issue ?

Regards ..
Reply With Quote
  #2  
Old 08-27-2005, 09:21 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well most stuff in there has changed a lot in 3.5. Also it is prefered not to do any editing anymore, but rely on plugins.

I would suggest that you have a look if that hack is already available for 3.5, and otherwise post a porting request in the original hacks thread.
Reply With Quote
  #3  
Old 08-27-2005, 09:36 AM
BoYagoob BoYagoob is offline
 
Join Date: Jan 2005
Location: Doha
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks sir for your reply,

actually, I tried to find an upgrade for this hack, but it didn't release yet ..

also, I post a porting request there:

https://vborg.vbsupport.ru/showthread.php?t=94824

I wish any one can help me ..

Regards ..
Reply With Quote
  #4  
Old 08-27-2005, 12:21 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hook: usercp_start
PHP Code:
if ($_POST['do'] == 'notes')
{
    
$userdata =& datamanager_init('User'$vbulletinERRTYPE_STANDARD);
    
$userdata->set_existing($vbulletin->userinfo);
    
$userdata->set('notes'$vbulletin->input->clean_gpc('p''notes'TYPE_NOHTML));
    
$userdata->save();

Hook: userdata_start
PHP Code:
$this->validfields['notes'] = array(TYPE_NOHTMLREQ_NO); 
Reply With Quote
  #5  
Old 08-27-2005, 01:04 PM
BoYagoob BoYagoob is offline
 
Join Date: Jan 2005
Location: Doha
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Many thanks KirbyDE for your reply.

Now I tried the codes you provied ..

but I couldn't find this hook name: userdata_save

I tried userdata_presave and then userdata_postsave and still this problem appears:

Quote:
Parse error: parse error, unexpected T_OBJECT_OPERATOR in d:\phpdev5\www\vb350\usercp.php(74) : eval()'d code on line 4
Reply With Quote
  #6  
Old 08-27-2005, 05:00 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Edited the Post. Sorry.
Reply With Quote
  #7  
Old 08-27-2005, 06:34 PM
BoYagoob BoYagoob is offline
 
Join Date: Jan 2005
Location: Doha
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks sir ..

But also, same problem occur ..

Quote:
Parse error: parse error, unexpected T_OBJECT_OPERATOR in d:\phpdev5\www\vb350\usercp.php(74) : eval()'d code on line 4
and cannot save any notes I tried to write ..



Small Question: about the title, I wrote: user notepad
for both hooks and wrote different titles but the problem still occur ..
I mean, shall I write a specific title for both?

Thanks again ..
Reply With Quote
  #8  
Old 08-28-2005, 03:50 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Seems to work just fine for me.
Reply With Quote
  #9  
Old 08-28-2005, 06:12 AM
BoYagoob BoYagoob is offline
 
Join Date: Jan 2005
Location: Doha
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

mmm ..

ok .. let me upload the forum online and I will install and test the hack ..

maybe the porblem in the localhost or some mistakes ..

and I will tell you what will happen to me ..

Many thanks sir for your help and support ..
Reply With Quote
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 07:31 PM.


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.05563 seconds
  • Memory Usage 2,238KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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