Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 28 Feb 2016, 00:17
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Real name: Ryan
[HELP] replace template with template plugin

i may have got it but it does not seem right to me, makes since, but doesnt seem right, can someone confirm this is the way or is there another way to do this.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


---------
i am trying to completely replace the whole template (string) of forumhome_loggedinuser template

i have my hook set to

forumhome_start

and about all i can manage to do is add to it, replacing is new to me.

this is what i have currently

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

but i dont want to just add to it, i want to completely replace the forumhome_loggedinuser template with drc_test
__________________
If you need custom work done please use Dirt RIF CustUmz
Owner of vBTeam
vBulletin 3.8.14 DRC Edition PHP 7.4 Compatible- NOT a null, NOT complete files Requires a legit copy of vBulletin 3.8.11.

Last edited by Dr.CustUmz; 28 Feb 2016 at 00:25.
Reply With Quote
  #2  
Old 28 Feb 2016, 04:43
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
In one of my vB 3.8.x mods, I wanted to replace the output from the "newpost_threadmanage" template with the output from a custom template. The output from the default template is displayed in the "newreply" template in the variable $threadmanagement. So, what I did was create a plugin hooked at "newreply_form_complete" with the following PHP code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

In vB 4.2.x you can more directly replace one template with another, but this was the workaround I devised for vB 3.8.x.
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #3  
Old 28 Feb 2016, 05:07
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Real name: Ryan
ok so say i want to replace $activeusers on forumhome
with a template i define as $myTemplate

would it be the same process? and would the code i have in $myTemplate be able to run in replace of $activeusers (which is the forumhome_loggedinusers template) i still want the same variables to work like $loggedin[musername]

its mainly the hooks i get lost on i dont know what hooks i need to use for things i try to do so mainly i just try different ones untill it works

right now im using with the hook (forumhome_loggedinuser)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and that works, but its not really what i want it to do.

i want it to replace $activeusers on forumhome and load my template.

im thinking

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

but would that work on forumhome_start hook, cause that template has to show $loggedin[musername] variables
__________________
If you need custom work done please use Dirt RIF CustUmz
Owner of vBTeam
vBulletin 3.8.14 DRC Edition PHP 7.4 Compatible- NOT a null, NOT complete files Requires a legit copy of vBulletin 3.8.11.
Reply With Quote
  #4  
Old 28 Feb 2016, 05:24
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
I would try the hook "forumhome_complete" hook location. See what you get...
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #5  
Old 28 Feb 2016, 05:56
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Real name: Ryan
it works, but it breaks my other plugin, this is what i have


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

i have tried changing the first plugin to different hooks also, but i cant get it to load the variables i need it to

the html is spitting out

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

when it should be: (in red)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


doing both plugins in one how i had does work but again not the desired way

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
If you need custom work done please use Dirt RIF CustUmz
Owner of vBTeam
vBulletin 3.8.14 DRC Edition PHP 7.4 Compatible- NOT a null, NOT complete files Requires a legit copy of vBulletin 3.8.11.
Reply With Quote
  #6  
Old 11 Mar 2016, 05:01
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Real name: Simon
Have you tried changing the execution order?
__________________
Kind regards,
Simon Microsoft Office Help
My Mods: Find my modifications here
Please do not pm me for support unless i have invited you to!
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
plugin - Replace email addresses in posts jugo vBulletin 3.5 Add-ons 23 19 Oct 2006 10:41



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


New To Site? Need Help?

All times are GMT. The time now is 04:12.

Layout Options | Width: Wide Color: