![]() |
[SOLVED]more than one replacement, same template on plugin
im trying to do multiple edits to showthread quickreply. individually these work, but when i do more than one only the first one works.
how can i make more than one change? Code:
$vbulletin->templatecache['showthread_quickreply'] = str_replace($find,$replace,$vbulletin->templatecache['showthread_quickreply']); |
Without knowing what's in the search and replace variables, it's hard to say. Have you tried reversing the order of the two lines of code?
I'm thinking the first line makes a change in the template code whereby the second line no longer finds the search text that was there before the first line changed it. |
its a little sloppy right now, but here it is:
Code:
$drcidl_inc = '<!-- / CSS Stylesheet -->'; grouping the causes and effects together to help you see better: Code:
$drcrb_hd = '<textarea name=\"message\" id=\"{$editorid}_textarea\" rows=\"10\" cols=\"60\" style=\"width:100%; height:{$editor_height}px\" tabindex=\"1\" dir=\"$stylevar[textdirection]\"></textarea>'; AND Code:
$find = '<textarea name=\"message\" id=\"{$editorid}_textarea\"'; and boom I caught it, might have fixed it lol, one sec for testing =) --------------- Added [DATE]1460263784[/DATE] at [TIME]1460263784[/TIME] --------------- yup that addition of the class was the issue =) switching the order to Code:
$vbulletin->templatecache['showthread_quickreply'] = str_replace($drcrb_hd,$drcrb_hd.fetch_template('drc_iiu_below_txtarea'),$vbulletin->templatecache['showthread_quickreply']); however is there a better way to do this? |
All times are GMT. The time now is 04:12 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|