Thread: Miscellaneous Hacks - Floating Guest Notify
View Single Post
  #79  
Old 07-16-2008, 03:55 PM
Sycoloco1212 Sycoloco1212 is offline
 
Join Date: Mar 2008
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i edited mine to go full screen and also left out the image to exit it since i cant find it.. this is what mine looks like ( The Code In RED Will Be What It Shows )

<Preview: http://img168.imageshack.us/img168/1328/registerew1.jpg >

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="phpkd_float_guest_notify" active="1">
	<title>Floating Guest Notify</title>
	<description><![CDATA[This Small mod. shows a small nice floating box notify the guest to register to gain full access & more features.]]></description>
	<version>1.0.0</version>
	<url><![CDATA[https://vborg.vbsupport.ru/misc.php?do=producthelp&pid=phpkd_float_guest_notify]]></url>
	<versioncheckurl><![CDATA[https://vborg.vbsupport.ru/misc.php?do=productcheck&pid=phpkd_float_guest_notify]]></versioncheckurl>
	<dependencies>
	</dependencies>
	<codes>
	</codes>
	<templates>
		<template name="phpkd_floating_guest_notify" templatetype="template" date="1191432967" username="z" version="1.0.0"><![CDATA[<if condition="$show['guest'] AND THIS_SCRIPT != 'register'">

<style type="text/css">
#topbar
{   
	PADDING-TOP: 5px;
	PADDING-BOTTOM: 5px;
	PADDING-RIGHT: 5px; 
	PADDING-LEFT: 5px;
	VISIBILITY: hidden;
	BORDER-TOP: black 1px solid;
	BORDER-BOTTOM: black 1px solid;
	BORDER-RIGHT: black 1px solid;
	BORDER-LEFT: black 1px solid;
	WIDTH: 100%;
	FONT-FAMILY: Tahoma;
	POSITION: absolute;
	BACKGROUND-COLOR: white
}
</style>

<script type="text/javascript">
var persistclose = $vboptions[phpkd_floating_guest_notify_closing]
var startX = $vboptions[phpkd_floating_guest_notify_xoffset]
var startY = $vboptions[phpkd_floating_guest_notify_yoffset]
var verticalpos = "$vboptions[phpkd_floating_guest_notify_position]"

function iecompattest()
{
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function get_cookie(Name)
{
	var search = Name + "="
	var returnvalue = "";
	if (document.cookie.length > 0)
	{
		offset = document.cookie.indexOf(search)
		if (offset != -1)
		{
			offset += search.length
			end = document.cookie.indexOf(";", offset);
			if (end == -1) end = document.cookie.length;
			returnvalue=unescape(document.cookie.substring(offset, end))
		}
	}
	return returnvalue;
}

function closebar()
{
	if (persistclose)
	document.cookie="remainclosed=1"
	document.getElementById("topbar").style.visibility="hidden"
}

function staticbar()
{
	barheight=document.getElementById("topbar").offsetHeight
	var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
	var d = document;
	function ml(id)
	{
		var el=d.getElementById(id);
		if (!persistclose || persistclose && get_cookie("remainclosed")=="")
		el.style.visibility="visible"
		if(d.layers)el.style=el;
		el.sP=function(x,y){this.style.$stylevar[right]=x+"px";this.style.top=y+"px";};
		el.x = startX;
		if (verticalpos=="fromtop")
			el.y = startY;
		else
		{
			el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
			el.y -= startY;
		}
		return el;
	}
	
	window.stayTopLeft=function()
	{
		if (verticalpos=="fromtop")
		{
			var pY = ns ? pageYOffset : iecompattest().scrollTop;
			ftlObj.y += (pY + startY - ftlObj.y)/8;
		}
		else
		{
			var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;
			ftlObj.y += (pY - startY - ftlObj.y)/8;
		}
		ftlObj.sP(ftlObj.x, ftlObj.y);
		setTimeout("stayTopLeft()", 10);
	}
	ftlObj = ml("topbar");
	stayTopLeft();
}

if (window.addEventListener)
	window.addEventListener("load", staticbar, false)
else if (window.attachEvent)
	window.attachEvent("onload", staticbar)
else if (document.getElementById)
	window.onload=staticbar
</script>

<div id="topbar">
	<table width="100%">
		<tr>
			<td width="99%">
					<phrase 1="$vboptions[bbtitle]" 2="register.php$session[sessionurl_q]">$vbphrase[you_are_unregistered]</phrase>&nbsp;&nbsp;&nbsp;&nbsp; </td><td width="1%"><a onclick="closebar(); return false" href="$vboptions[bburl]"><img style="float: $stylevar[left]" src="$stylevar[imgdir_misc]/close.gif" border="0"></a>
			</td>
		</tr>
	</table>
</div>

</if>]]></template>
	</templates>
	<plugins>
		<plugin active="1" executionorder="5">
			<title>Floating Guest Notify Template Cache</title>
			<hookname>cache_templates</hookname>
			<phpcode><![CDATA[if ($vbulletin->options['phpkd_floating_guest_notify_status'] AND $vbulletin->options['phpkd_floating_guest_notify_autotemp'])
{
	$globaltemplates[] = 'phpkd_floating_guest_notify';
}]]></phpcode>
		</plugin>
		<plugin active="1" executionorder="5">
			<title>Floating Guest Notify Template Change</title>
			<hookname>parse_templates</hookname>
			<phpcode><![CDATA[if ($vbulletin->options['phpkd_floating_guest_notify_status'] AND $vbulletin->options['phpkd_floating_guest_notify_autotemp'])
{
	$vbulletin->templatecache['header'] = str_replace($vbulletin->options['phpkd_floating_guest_notify_search_text'], $vbulletin->options['phpkd_floating_guest_notify_search_text'].$vbulletin->templatecache['phpkd_floating_guest_notify'],$vbulletin->templatecache['header']);
}]]></phpcode>
		</plugin>
	</plugins>
	<phrases>
		<phrasetype name="GLOBAL" fieldname="global">
			<phrase name="you_are_unregistered" date="1191433161" username="z" version="1.0.0"><![CDATA[<FONT COLOR="black">&nbsp;&nbsp;Welcome to the MultiPlayer Gamerz forums, To gain full access to MultiPlayer Gamerz you must, </font><a href="{2}"><FONT COLOR="#0000ff">register</font></a><FONT COLOR="black">  for a free account to gain Full access.</font>]]></phrase>
		</phrasetype>
		<phrasetype name="vBulletin Settings" fieldname="vbsettings">
			<phrase name="setting_phpkd_floating_guest_notify_autotemp_desc" date="1191430251" username="z" version="1.0.0"><![CDATA[Set to 'Yes' to enable the Automatic Template Changes for this modification. If you disable this, the modification will not work unless you manually edit the relevant templates.]]></phrase>
			<phrase name="setting_phpkd_floating_guest_notify_autotemp_title" date="1191430251" username="z" version="1.0.0"><![CDATA[Auto template change]]></phrase>
			<phrase name="setting_phpkd_floating_guest_notify_closing_desc" date="1191429390" username="z" version="1.0.0"><![CDATA[Set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session]]></phrase>
			<phrase name="setting_phpkd_floating_guest_notify_closing_title" date="1191429390" username="z" version="1.0.0"><![CDATA[Closing behavior]]></phrase>
			<phrase name="setting_phpkd_floating_guest_notify_position_desc" date="1191429759" username="z" version="1.0.0"><![CDATA[Set the floating position of the notify box, "fromtop" or "frombottom".]]></phrase>
			<phrase name="setting_phpkd_floating_guest_notify_position_title" date="1191429759" username="z" version="1.0.0"><![CDATA[Floating position]]></phrase>
			<phrase name="setting_phpkd_floating_guest_notify_search_text_desc" date="1191431364" username="z" version="1.0.0"><![CDATA[Edit the text that the Auto Template Change searches for. Do <b>not</b> alter this unless you understand what you are doing, otherwise the modification will stop working.]]></phrase>
			<phrase name="setting_phpkd_floating_guest_notify_search_text_title" date="1191431364" username="z" version="1.0.0"><![CDATA[Auto-Template Search Text]]></phrase>
			<phrase name="setting_phpkd_floating_guest_notify_status_desc" date="1191429305" username="z" version="1.0.0"><![CDATA[Check if you need to activate or deactivate the floating guest notify.]]></phrase>
			<phrase name="setting_phpkd_floating_guest_notify_status_title" date="1191429305" username="z" version="1.0.0"><![CDATA[Floating Guest Notify Active?]]></phrase>
			<phrase name="setting_phpkd_floating_guest_notify_xoffset_desc" date="1191429478" username="z" version="1.0.0"><![CDATA[Set X offset of bar in pixels.]]></phrase>
			<phrase name="setting_phpkd_floating_guest_notify_xoffset_title" date="1191429478" username="z" version="1.0.0"><![CDATA[X offset]]></phrase>
			<phrase name="setting_phpkd_floating_guest_notify_yoffset_desc" date="1191429495" username="z" version="1.0.0"><![CDATA[Set Y offset of bar in pixels.]]></phrase>
			<phrase name="setting_phpkd_floating_guest_notify_yoffset_title" date="1191429495" username="z" version="1.0.0"><![CDATA[Y offset]]></phrase>
			<phrase name="settinggroup_phpkd_floating_guest_notify" date="1191429164" username="z" version="1.0.0"><![CDATA[Floating Guest Notify]]></phrase>
		</phrasetype>
	</phrases>
	<options>
		<settinggroup name="phpkd_floating_guest_notify" displayorder="1120">
			<setting varname="phpkd_floating_guest_notify_status" displayorder="10">
				<datatype>boolean</datatype>
				<optioncode>yesno</optioncode>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="phpkd_floating_guest_notify_closing" displayorder="20">
				<datatype>boolean</datatype>
				<optioncode>yesno</optioncode>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="phpkd_floating_guest_notify_xoffset" displayorder="30">
				<datatype>number</datatype>
				<defaultvalue>3</defaultvalue>
			</setting>
			<setting varname="phpkd_floating_guest_notify_yoffset" displayorder="40">
				<datatype>number</datatype>
				<defaultvalue>3</defaultvalue>
			</setting>
			<setting varname="phpkd_floating_guest_notify_position" displayorder="50">
				<datatype>free</datatype>
				<optioncode>select:piped
fromtop|fromtop
frombottom|frombottom</optioncode>
				<defaultvalue>fromtop</defaultvalue>
			</setting>
			<setting varname="phpkd_floating_guest_notify_autotemp" displayorder="60">
				<datatype>boolean</datatype>
				<optioncode>yesno</optioncode>
				<defaultvalue>1</defaultvalue>
			</setting>
			<setting varname="phpkd_floating_guest_notify_search_text" displayorder="70">
				<datatype>free</datatype>
				<defaultvalue><![CDATA[<!-- logo -->]]></defaultvalue>
			</setting>
		</settinggroup>
	</options>
	<helptopics>
	</helptopics>
	<cronentries>
	</cronentries>
	<faqentries>
	</faqentries>
</product>
Edit the RED Colored Code to your needs
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01253 seconds
  • Memory Usage 1,824KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete