Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 02-09-2011, 11:58 PM
TheInsaneManiac TheInsaneManiac is offline
 
Join Date: Feb 2008
Posts: 1,360
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

global_start, which should I be using?
Reply With Quote
  #12  
Old 02-10-2011, 12:01 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

forumhome_start
forumhome_complete -> Most likely, this one
Reply With Quote
  #13  
Old 02-10-2011, 12:10 AM
TheInsaneManiac TheInsaneManiac is offline
 
Join Date: Feb 2008
Posts: 1,360
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #14  
Old 02-10-2011, 12:13 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It comes up fine for me.
Reply With Quote
  #15  
Old 02-10-2011, 12:41 AM
TheInsaneManiac TheInsaneManiac is offline
 
Join Date: Feb 2008
Posts: 1,360
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Because I reverted back to the old code. Im not just going to leave my website down lol.
Reply With Quote
  #16  
Old 02-10-2011, 01:26 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #17  
Old 02-10-2011, 06:08 AM
TheInsaneManiac TheInsaneManiac is offline
 
Join Date: Feb 2008
Posts: 1,360
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PMed code
Reply With Quote
  #18  
Old 03-21-2011, 06:16 PM
TheInsaneManiac TheInsaneManiac is offline
 
Join Date: Feb 2008
Posts: 1,360
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #19  
Old 03-21-2011, 11:13 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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).
Reply With Quote
  #20  
Old 03-23-2011, 10:50 PM
TheInsaneManiac TheInsaneManiac is offline
 
Join Date: Feb 2008
Posts: 1,360
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 10:46 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.06376 seconds
  • Memory Usage 2,263KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete