vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Automatic Template Edits (https://vborg.vbsupport.ru/showthread.php?t=258536)

TheInsaneManiac 02-09-2011 11:58 PM

global_start, which should I be using?

Boofo 02-10-2011 12:01 AM

Well, if you want it on the forumhome, I would use one of those.

forumhome_start
forumhome_complete -> Most likely, this one

TheInsaneManiac 02-10-2011 12:10 AM

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.

Boofo 02-10-2011 12:13 AM

It comes up fine for me.

TheInsaneManiac 02-10-2011 12:41 AM

Because I reverted back to the old code. Im not just going to leave my website down lol.

Lynne 02-10-2011 01:26 AM

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.

TheInsaneManiac 02-10-2011 06:08 AM

PMed code

TheInsaneManiac 03-21-2011 06:16 PM

I seriously think someone is playing games.

I added this code:
Code:

                $templater = vB_Template::Create('soundnotification');
                $soundnotification .= $templater->render();
                vB_Template::preRegister('header',array('soundnotification' => $soundnotification));

then $soundnotification to the top of my header template. Cleared cache. All it shows is "$soundnotification" in the source code...

soundnotification template:
Code:

<if condition="$vboptions['sound_notification_enabled']"><if condition="$bbuserinfo['fieldXX'] === 'No'">
                <else />
                <embed src="mail.mp3" autostart="true" hidden="true">
                </if>
                </if>


Lynne 03-21-2011 11:13 PM

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).

TheInsaneManiac 03-23-2011 10:50 PM

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"?>

<product productid="soundnotification" active="1">
        <title>Sound Notification</title>
        <description>A sound is played when a notification is received.</description>
        <version>2.0</version>
        <url><![CDATA[https://vborg.vbsupport.ru/showthread.php?t=224997]]></url>

<dependencies>
                <dependency dependencytype="vbulletin" minversion="4.0.0" maxversion="4.9.9" />
        </dependencies>
        <templates>
        <template name="soundnotification" templatetype="template" date="1164681507" username="TheInsaneManiac" version="3.8.0"><![CDATA[                <vb:if condition="$vboptions['sound_notification_enabled']"><vb:if condition="$bbuserinfo['fieldXX'] === 'No'">
                <else />
                <embed src="mail.mp3" autostart="true" hidden="true">
                </vb:if>
                </vb:if>]]>
                </template>
        </templates>
<plugins>
        <plugin active="1" product="sound_notification">
                <title>Sound Notification Cache</title>
                <hookname>cache_templates</hookname>
                <phpcode><![CDATA[if ($vbulletin->options['sound_notification_enabled'])
                {
                $cache[] = 'soundnotification';
                }]]></phpcode>
        </plugin>
        <plugin active="1" executionorder="5">
                <title>Sound Notification Begin</title>
                <hookname>global_start</hookname>
                <phpcode><![CDATA[if ($vbulletin->options['sound_notification_enabled'])
                {
                $templater = vB_Template::Create('soundnotification');
                $soundnotification .= $templater->render();
                vB_Template::preRegister('header',array('soundnotification' => $soundnotification));
                }]]></phpcode>
        </plugin>
        <plugin active="1" executionorder="5">
                <title>Sound Notification End</title>
                <hookname>parse_templates</hookname>
                <phpcode><![CDATA[
                        if(THIS_SCRIPT == 'index' && ($vbulletin->options['affiliation_enabled']))
                        {
                        $vbphrase['powered_by_vbulletin'] .= "<br /><div class=\"smallfont\" align=\"center\">Sound Notification by <a href=\"https://vborg.vbsupport.ru/member.php?u=238957\">TheInsaneManiac</a> of <a href=\"http://www.consolediscussions.com/forum/\">ConsoleDiscussions</a></div>";
                        }]]></phpcode>
        </plugin>
</plugins>
        <phrases>
                <phrasetype name="vBulletin Settings" fieldname="vbsettings">
                <phrase name="setting_sound_notification_enabled_title" username="TheInsaneManiac"><![CDATA[Sound Notification Settings]]></phrase>
                <phrase name="setting_sound_notification_enabled_desc" username="TheInsaneManiac"><![CDATA[Enable Sound Notification?]]></phrase>
                <phrase name="settinggroup_sound_notification" username="TheInsaneManiac"><![CDATA[Sound Notification]]></phrase>
                </phrasetype>
        </phrases>
        <options>
<settinggroup name="sound_notification" displayorder="9999">
        <setting varname="sound_notification_enabled" displayorder="1">
                <datatype>number</datatype>
                <optioncode>yesno</optioncode>
                <defaultvalue>1</defaultvalue>
        </setting>
        </settinggroup>
        </options>
</product>



All times are GMT. The time now is 04:28 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
  • Page Generation 0.02899 seconds
  • Memory Usage 1,756KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete