vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - Floating Guest Notify (https://vborg.vbsupport.ru/showthread.php?t=159418)

Javierogo 06-07-2008 06:40 AM


maleficarum 06-08-2008 11:19 AM

Works great! Thanks.

Mrdby 06-08-2008 02:02 PM

upload the image close.gif to the 'misc' directory in your images folder. there is nothing to upload.

callumbush 06-17-2008 10:54 PM

Yeah where is the image? I can't find it either...
Can someone email it to me? :)

globofan 06-24-2008 08:52 AM

yeh same problem, the image file is not there.

kylek 06-27-2008 11:17 PM

Works great with 3.7.2!! Only thing to figure out how to center the message.

dadoc 07-07-2008 09:32 AM

I have installed but I want to change the font color

any ideas?

Sycoloco1212 07-16-2008 03:55 PM

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

Sycoloco1212 07-16-2008 04:16 PM

alright now for the image i made this https://vborg.vbsupport.ru/ Direct Link: http://img366.imageshack.us/img366/5356/23092320gn6.jpg

so when you get done it will look like this.. Sorry image was to big to cut it out so that side << got cut off <Preview: http://img410.imageshack.us/img410/2...terexitme5.jpg >

Download the image close.jpg below first

now goto you sites directory or use FTP and goto

Public_Html - Forums - Images - Styles - YOUR THEMES FOLDER - Misc

now drop the close.jpg inside the MISC folder were i specified.. now it won't work just yet as you can see we used jpg... and we need gif.. so now right click the close.jpg and click rename "make sure its inside the misc folder before renameing" then rename it to close.gif ( for maximum quality ) then just save everything and now you should have a exit button..

now if you want it so when they close it, and refresh the page or goto a different page goto ( admin CP - vBulletin Options - Floating Guest Notify ) and set Closing behavior to NO then hit save

also you can see a demo here of everything: Http://mpgamerz.net Register if you want =)

YuOr 07-17-2008 06:20 PM

Installed, thanks!
Just my two cents :)
1. I attached the close.gif (just in case somebody is still looking for it). Right click on it and save
2. I uploaded gif to my style's misc folder, not forum/images/misc and now it works


All times are GMT. The time now is 03:15 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.01852 seconds
  • Memory Usage 1,806KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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