![]() |
Need help injecting code
Trying to do a str_replace in postbit_legacy and I'm not getting any results - Here's my code.
PHP Code:
Any ideas/suggestions? Thanks :) |
Try this:
Code:
if ($vbulletin->options['legacypostbit']) |
1 Attachment(s)
Thanks, but it didn't work for me.
Check out my attachment...what I've circled...between the post counter and the checkbox is where I want to inject that code. That is posbit_legacy, right? |
Try running the code I gave you in the process_templates_complete hook.
|
Thanks,
I tried that and got no love. :( |
Okay, try this:
Code:
require_once(DIR . '/includes/adminfunctions_template.php'); |
Still not showing up.
I echo'd out the variable $find to see what was going on and I get this: HTML Code:
if ($post['postid'] AND $post['threadid'] AND !$show['moderated']) { |
What I gave you should have worked.
What are you trying to add and where? Maybe getting the specifics will help. |
Quote:
Quote:
If you look up to a previous post where I added an attachment, you will see the Post number with the checkbox to the right of it (what's circled) Right in between the post # and the checkbox, I'm trying to add a hyperlink. The method I'm trying to use is to avoid going into the postbit_legacy template and manually adding it. By searching for a specific string, and then appending the hyperlink to that string would do the trick...at least, that's what I've learned from viewing other people's mods. Problem is I haven't found a similar mod that is 4.0 compatible...I see this technique used a lot in 3.x mods |
Yes, the variables make it a little more difficult to do straight-forward string replaces now.
Let me ask you this... does the hyperlink need to go there or can you put it in a different spot? |
All times are GMT. The time now is 03:48 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|