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

Reply
 
Thread Tools Display Modes
  #11  
Old 06-03-2013, 05:15 PM
omardealo's Avatar
omardealo omardealo is offline
 
Join Date: Nov 2008
Location: egypt
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes now is okay ...

but if put html in this setting option must be like this
PHP Code:
<a href=\"$vboptions[bburl]\">$vboptions[bbtitle]</a> 
befor every " must put \ like PHP files

i think There is another way
by put variable setting in another template and print it in first template
i think this worked too ..


kh99 , God bless you :up:
Your Help make us not despair of finding a solution !
Reply With Quote
  #12  
Old 06-03-2013, 05:54 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, try this:
PHP Code:
eval('$pointspages = replace_template_variables("' addcslashes($vbulletin->options[points_pages], '"') . '");'); 
I get confused by things like this - I don't know if there are any characters other than " that you should be escaping. But start with that and see what happens.
Reply With Quote
  #13  
Old 06-03-2013, 07:45 PM
omardealo's Avatar
omardealo omardealo is offline
 
Join Date: Nov 2008
Location: egypt
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
OK, try this:
PHP Code:
eval('$pointspages = replace_template_variables("' addcslashes($vbulletin->options[points_pages], '"') . '");'); 
I get confused by things like this - I don't know if there are any characters other than " that you should be escaping. But start with that and see what happens.

Erorr function
PHP Code:
 Fatal errorCall to undefined function pointspages() in misc.php(100) : eval()'d code(8) : eval()'d code on line 1 
i hope found way to put html code without escaping any characters
i put simple html code in setting option like this ..

PHP Code:
bla bla bla <a href="$vboptions[bburl]">$vboptions[bbtitle]</a>
bla bla bla bla 
<ul>
<
li>bla bla bla</li>
<
li>bla bla bla</li>
<
ul>
<
br />
bla bla bla ..... 
Reply With Quote
  #14  
Old 06-03-2013, 08:55 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you saying you've got it working now?

If not, I don't see why you'd get that error. You'd have to post your exact code.
Reply With Quote
  #15  
Old 06-04-2013, 05:21 AM
omardealo's Avatar
omardealo omardealo is offline
 
Join Date: Nov 2008
Location: egypt
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
Are you saying you've got it working now?

If not, I don't see why you'd get that error. You'd have to post your exact code.
Sorry , You are right , I made ​​a mistake in something
now no erorr but also data not show

code
PHP Code:
if ($_REQUEST['do'] == 'points')

$navbits construct_navbits(array(
        
'' => 'points'
    
));

require_once(
DIR '/includes/functions_misc.php');
eval(
'$pointspages = replace_template_variables("' addcslashes($vbulletin->options[pointspages], '"') . '");');  
eval(
'$navbar = "' fetch_template('navbar') . '";');
eval(
'print_output("' fetch_template('points_pages') . '");'); 

Reply With Quote
  #16  
Old 06-04-2013, 05:22 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

shouldn't addcslashes be addslashes
Reply With Quote
Благодарность от:
omardealo
  #17  
Old 06-04-2013, 05:46 AM
omardealo's Avatar
omardealo omardealo is offline
 
Join Date: Nov 2008
Location: egypt
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zachery View Post
shouldn't addcslashes be addslashes
thnx ... i try it

PHP Code:
if ($_REQUEST['do'] == 'points')

$navbits construct_navbits(array(
        
'' => 'points'
    
));

require_once(
DIR '/includes/functions_misc.php');
eval(
'$pointspages = replace_template_variables("' addslashes($vbulletin->options[pointspages], '"') . '");');  
eval(
'$navbar = "' fetch_template('navbar') . '";');
eval(
'print_output("' fetch_template('points_pages') . '");'); 


show to me erorr

PHP Code:
WarningWrong parameter count for addslashes() in [path]\misc.php(100) : eval()'d code on line 12 
--------------- Added [DATE]1370328837[/DATE] at [TIME]1370328837[/TIME] ---------------

sorry i update it by one Parameter
do not show me erorr but data also don't show
PHP Code:
eval('$pointspages = replace_template_variables("' addslashes($vbulletin->options[pointspages]) . '");'); 
--------------- Added [DATE]1370330612[/DATE] at [TIME]1370330612[/TIME] ---------------
Reply With Quote
  #18  
Old 06-04-2013, 09:04 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zachery View Post
shouldn't addcslashes be addslashes
Maybe, I'm not sure. But addslashes() escapes ', ", \, and null characters. addcslashes() escapes the characters you list as the second parameter, so I think addcslahses() will work if you provide the correct list of chars. This code is taking the setting text and using it as a double-quoted string. So I know double quotes need to be escaped, but I'm not sure what else might need to be. I don't think single quotes need to be, and I think if you escaped backslashes you couldn't use things like \n in the text.
Reply With Quote
  #19  
Old 06-04-2013, 09:43 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, try this:

PHP Code:
eval('$pointspages = "' replace_template_variables(addcslashes($vbulletin->options[pointspages], '"')) . '";'); 
Reply With Quote
  #20  
Old 06-05-2013, 04:05 AM
omardealo's Avatar
omardealo omardealo is offline
 
Join Date: Nov 2008
Location: egypt
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
OK, try this:

PHP Code:
eval('$pointspages = "' replace_template_variables(addcslashes($vbulletin->options[pointspages], '"')) . '";'); 
Now i'm So HaPpy
the code very excellent and works wonderfully
Thank you , kh99
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 12:44 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.04548 seconds
  • Memory Usage 2,309KB
  • 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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (11)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete