vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   [SOLVED] str_replace issue with rawphrase (https://vborg.vbsupport.ru/showthread.php?t=307071)

omardealo 01-16-2014 10:49 AM

[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 ...

ozzy47 01-16-2014 08:48 PM

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>';


omardealo 01-17-2014 07:33 PM

Quote:

Originally Posted by ozzy47 (Post 2474722)
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 ..!

ozzy47 01-17-2014 09:19 PM

Ok where is this supposed to be happening, and what exactly is it you are trying to accomplish?

kh99 01-17-2014 11:13 PM

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>';


omardealo 01-17-2014 11:54 PM

Quote:

Originally Posted by kh99 (Post 2475021)
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

ozzy47 01-17-2014 11:56 PM

Glad it's working now, that's why I like to test stuff before I post it though. :)

omardealo 01-17-2014 11:58 PM

Quote:

Originally Posted by ozzy47 (Post 2475023)
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


All times are GMT. The time now is 03:26 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.00976 seconds
  • Memory Usage 1,731KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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