Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 14 Dec 2009, 19:37
Mrajp Mrajp is offline
 
Join Date: Mar 2005
Changing templates with plugins

Just when I thought I had finally understood a small percentage of the vBulletin code, a completely new (but very powerful) template syntax has been released!

I have a small piece of code that adds an extra checkbox when a user is posting a reply. This ultimately adds some text to the message area and changes the prefix. Unfortunately with the new version, the page wont even load.

I've read some of the template articles and examined some 4.0 mods. However, they are at a level higher than my current vBulletin code comprehension.

Here is the code that is compatible with vB 3.8 using the "newreply_form_complete" hook:


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


There is also another plugin hooked to "newreply_post_start" that massages the data. It probably isn't compatible either, but I'll cross that bridge when I get to it.

Is there still a way to perform the functionality of my current code? If so, could someone give me some guidance?

Last edited by Mrajp : 15 Dec 2009 at 14:33. Reason: Missed question
Reply With Quote
  #2  
Old 14 Dec 2009, 19:42
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Is there a question here?
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #3  
Old 15 Dec 2009, 14:32
Mrajp Mrajp is offline
 
Join Date: Mar 2005
Whoops! I just realized I forgot to ask one. Thanks Lynne!

Is there still a way to perform the functionality of my current code? If so, could someone give me some guidance?

Thanks in advance.
Reply With Quote
  #4  
Old 15 Dec 2009, 14:46
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
It would be like this.

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

Reply With Quote
  #5  
Old 15 Dec 2009, 20:22
Mrajp Mrajp is offline
 
Join Date: Mar 2005
Originally Posted by BBR-APBT View Post
It would be like this.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
I don't mean to seem ignorant, but the only difference I see between your code and mine is that the $replace string is all on one line. Are you saying that vB 4.0 can only handle 1 line replacement strings?

The above code still doesn't work in vB 4.0

Last edited by Mrajp : 15 Dec 2009 at 20:28.
Reply With Quote
  #6  
Old 15 Dec 2009, 21:09
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Originally Posted by Mrajp View Post
I don't mean to seem ignorant, but the only difference I see between your code and mine is that the $replace string is all on one line. Are you saying that vB 4.0 can only handle 1 line replacement strings?

The above code still doesn't work in vB 4.0
With the proper hook location? process_templates_complete
Reply With Quote
  #7  
Old 17 Dec 2009, 08:55
Mrajp Mrajp is offline
 
Join Date: Mar 2005
Originally Posted by BBR-APBT View Post
With the proper hook location? process_templates_complete
Well, I originally didn't have the hook location set to "process_templates_complete". However, even after changing the hook location, I get the following error message and the page does not load:


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

I've hardcoded the replace string into the style just to verify that the HTML is correct. When hardcoded, the page loads without error and the checkbox appears.

Any Ideas?
Reply With Quote
  #8  
Old 17 Dec 2009, 15:03
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Can I see your exact code.

You can post the error all day long with out the code its no good.
Reply With Quote
  #9  
Old 17 Dec 2009, 19:16
Mrajp Mrajp is offline
 
Join Date: Mar 2005
Most certainly,

Here is the section of the style 'newreply' with the comment

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

Here is my complete plugin code on the 'process_templates_complete' hook:


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

I'm running vB 4.0 RC2.

Please let me know if you need any more information.

Thanks Again.
Reply With Quote
  #10  
Old 17 Dec 2009, 19:44
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Try this

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

I switched the " and ' around.
Reply With Quote
  #11  
Old 17 Dec 2009, 19:58
ragtek's Avatar
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
My question is a little bit offtopic.

Can the new vB4 Template Mering be used for this?
http://www.vbulletin.com/forum/entry...Way-Comparison

Anybody tried this?
__________________
my addons: http://ragtek.github.com
Reply With Quote
  #12  
Old 17 Dec 2009, 20:29
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Originally Posted by ragtek View Post
My question is a little bit offtopic.

Can the new vB4 Template Mering be used for this?
http://www.vbulletin.com/forum/entry...Way-Comparison

Anybody tried this?
It should stay there with upgrade but I don't trust it my self as I haven't tested that feature out enough yet.
Reply With Quote
  #13  
Old 18 Dec 2009, 09:28
Mrajp Mrajp is offline
 
Join Date: Mar 2005
Originally Posted by BBR-APBT View Post
Try this

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

I switched the " and ' around.
Switching the string identifiers fixed the problem. Thank you so very much!

Originally Posted by ragtek View Post
My question is a little bit offtopic.

Can the new vB4 Template Mering be used for this?
http://www.vbulletin.com/forum/entry...Way-Comparison

Anybody tried this?
This looks interesting, I'm going to have a lot of style changes to make and I may try this.
Reply With Quote
  #14  
Old 18 Dec 2009, 09:33
ragtek's Avatar
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
If it's not working, try tms!
__________________
my addons: http://ragtek.github.com
Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Advanced Templates: Dynamic Templates Changing according to different conditions Logician vBulletin 2.x Full Releases 312 24 Apr 2005 19:20

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
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 00:26.

Layout Options | Width: Wide Color: