![]() |
Automatic Template Edits
I am trying to get:
{vb:raw affiliation} To display my affiliation template within the forumhome template, but I am having no luck. It doesn't display anything when I place {vb:raw affiliation} in my FORUMHOME template. hook - global_start Code:
$templater = vB_Template::Create('affiliation'); |
PHP Code:
|
I get a server error when using that code.
|
You need to create and render a template and then preregister that variable for use in another template.
PHP Code:
Also, if you look up the hook global_start in the files, you'll see this: PHP Code:
|
I used global_start with no problems, but as soon as I add your code, I get server errors. It works no problem before the code was added. Hooks work fine, but I would like to be able to place it anywhere in the forumhome. As soon as I add your code in place of mine, I get server errors.
Code:
$templater = vB_Template::create('affiliation'); |
You can't add exactly my code since I didn't input any variables to register in your template. Also, we can't help with errors if you don't tell us exactly what error you are getting. It would also help to actually see the affiliation template code.
Also, I accidentally wrote "reRegister" instead of "preRegister" in mine above which I have since fixed. Also, <center> tags still work these days also, but they are deprecated. One of these days they will stop working, just as the global_start hook location will stop working. I've always figured it's best to fix that now, rather than when it gets broken, but that is your call.What is the code you posted for? |
What variables, this is what I don't understand. I don't have any variables. I simply just want the affiliation code to display in forumhome.
If global_start and center are going to be gone soon, what will be their replacing counterparts? Everyone uses <center> I don't know why it would be depreciated... |
Quote:
|
Quote:
|
What hook are you using to call the template from?
|
global_start, which should I be using?
|
Well, if you want it on the forumhome, I would use one of those.
forumhome_start forumhome_complete -> Most likely, this one |
Still get a server error.
Server error. The website encountered an error while retrieving http://www.consolediscussions.com/forum/forum.php. It may be down for maintenance or configured incorrectly. Here are some suggestions: Reload this web page later. |
It comes up fine for me.
|
Because I reverted back to the old code. Im not just going to leave my website down lol.
|
It could be your template is the problem and not your plugin. So I'll ask again if you can you please post your template code.
|
PMed code
|
I seriously think someone is playing games.
I added this code: Code:
$templater = vB_Template::Create('soundnotification'); soundnotification template: Code:
<if condition="$vboptions['sound_notification_enabled']"><if condition="$bbuserinfo['fieldXX'] === 'No'"> |
No one is playing games, you are just not using the correct vB4 syntax. You cannot put $soundnotification in the template, it is {vb:raw soundnotification}. And you cannot do <if condition... , it is <vb:if (same for other parts of the condition - you are using the wrong syntax).
|
Still no worky, I put {vb:raw soundnotification} at the top of my header template and it doesn't even show anything in the view source, no sign of the code at all.
Here's my whole xml to prove Im doing everything right, let me add that I've even tried removing the conditionals altogether: Code:
<?xml version="1.0" encoding="ISO-8859-1"?> |
What is this?
Code:
<vb:if condition="$bbuserinfo['fieldXX'] === 'No'"> The XX in fieldXX should be a field number. And the === should be ==. |
Quote:
|
Try replacing this:
Code:
if ($vbulletin->options['sound_notification_enabled']) With his: Code:
if ($vbulletin->options['sound_notification_enabled']) |
I don't want to use hooks though, the whole purpose is to only activate when the user gets a notification.
|
You can still use a conditional for the notification.
|
Is there a conditional for when they have one unread message?
|
All times are GMT. The time now is 10:35 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:
|