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

Reply
 
Thread Tools Display Modes
  #1  
Old 01-16-2014, 10:49 AM
omardealo's Avatar
omardealo omardealo is offline
 
Join Date: Nov 2008
Location: egypt
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default [SOLVED] str_replace issue with rawphrase

Hello ,

i'm use this code , It's correct Code but not worked with rawphrase

PHP Code:
$find ='{vb:rawphrase remove_redirects}</label></li>';

$replace ='{vb:rawphrase remove_redirects}</label></li><li><label><input tabindex=\"51\" type=\"radio\" name=\"do\" value=\"newsadd\" />{vb:rawphrase newsadd_thread}</label></li>';

$vbulletin->templatecache['SHOWTHREAD'] = str_replace($find$replace$vbulletin->templatecache['SHOWTHREAD']); 

Thnx ...
Reply With Quote
  #2  
Old 01-16-2014, 08:48 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Instead of that try this:

Code:
$find ='' . vB_Template_Runtime::parsePhrase("remove_redirects") . '</label></li>';

$replace ='' . vB_Template_Runtime::parsePhrase("remove_redirects") . '</label></li><li><label><input tabindex=\"51\" type=\"radio\" name=\"do\" value=\"newsadd\" />' . vB_Template_Runtime::parsePhrase("newsadd_thread") . '</label></li>';
Reply With Quote
  #3  
Old 01-17-2014, 07:33 PM
omardealo's Avatar
omardealo omardealo is offline
 
Join Date: Nov 2008
Location: egypt
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ozzy47 View Post
Instead of that try this:

Code:
$find ='' . vB_Template_Runtime::parsePhrase("remove_redirects") . '</label></li>';

$replace ='' . vB_Template_Runtime::parsePhrase("remove_redirects") . '</label></li><li><label><input tabindex=\"51\" type=\"radio\" name=\"do\" value=\"newsadd\" />' . vB_Template_Runtime::parsePhrase("newsadd_thread") . '</label></li>';
i try it but i'm sorry , not worked too
Note : i try hook (showthread_start AND showthread_complete)

Any other suggestions
THNX SO MUCH ..!
Reply With Quote
  #4  
Old 01-17-2014, 09:19 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok where is this supposed to be happening, and what exactly is it you are trying to accomplish?
Reply With Quote
  #5  
Old 01-17-2014, 11:13 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think what ozzy posted just had quote problems. Maybe this:

Code:
$find ='\' . vB_Template_Runtime::parsePhrase("remove_redirects") . \'</label></li>';

$replace ='\' . vB_Template_Runtime::parsePhrase("remove_redirects") . \'</label></li><li><label><input tabindex="51" type="radio" name="do" value="newsadd" />\' . vB_Template_Runtime::parsePhrase("newsadd_thread") . \'</label></li>';
Reply With Quote
2 благодарности(ей) от:
omardealo, ozzy47
  #6  
Old 01-17-2014, 11:54 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
I think what ozzy posted just had quote problems. Maybe this:

Code:
$find ='\' . vB_Template_Runtime::parsePhrase("remove_redirects") . \'</label></li>';

$replace ='\' . vB_Template_Runtime::parsePhrase("remove_redirects") . \'</label></li><li><label><input tabindex="51" type="radio" name="do" value="newsadd" />\' . vB_Template_Runtime::parsePhrase("newsadd_thread") . \'</label></li>';
kh99 , Yeah this is worked Good , thnx
ozzy, thnx man
Reply With Quote
Благодарность от:
ozzy47
  #7  
Old 01-17-2014, 11:56 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad it's working now, that's why I like to test stuff before I post it though.
Reply With Quote
  #8  
Old 01-17-2014, 11:58 PM
omardealo's Avatar
omardealo omardealo is offline
 
Join Date: Nov 2008
Location: egypt
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ozzy47 View Post
Glad it's working now, that's why I like to test stuff before I post it though.
Never Mind, you do what you can, thanks again
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 04:23 AM.


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.07557 seconds
  • Memory Usage 2,245KB
  • 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
  • (4)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (3)post_thanks_box_bit
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete