The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
hi i used to use this image
HTML Code:
<img id="reminder_{vb:raw favid}_toggler" src="clear.gif" class="reminder_toggler<vb:if condition="$show['fav']">_active</vb:if>" onclick="FAVReminder.Toggle({vb:raw favid});" title="<vb:if condition="$show['fav']">Remove Favorite<vb:else />Add Favorite</vb:if>" />
PHP Code:
|
|
#2
|
||||
|
||||
|
With the code you posted you are not registering the variables.
This one to be exact: favid you may also have to register $show depending where you want to use it. https://vborg.vbsupport.ru/showthread.php?t=228078 |
|
#3
|
|||
|
|||
|
this is the hook that uses ajax_complete
PHP Code:
|
|
#4
|
|||
|
|||
|
anyone able to help me out.
|
|
#5
|
||||
|
||||
|
Did you do what BBR suggested and register the variables for use in the template? I don't see anything in any of your code regarding that.
(PS. And it's javascript, not java. They are two different languages.) |
|
#6
|
|||
|
|||
|
i have m8 here
PHP Code:
|
|
#7
|
||||
|
||||
|
And what do you see in the template? Where are you using $favbits afterwards? And is that variable registered for use in the template you are using it in?
|
|
#8
|
|||
|
|||
|
yes cause the link is showing up
HTML Code:
<img id="reminder_15_toggler" src="clear.gif" class="reminder_toggler<vb:if condition="$show['fav']">_active</vb:if>" onclick="FAVReminder.Toggle(15);" title="<vb:if condition="$show['fav']">Remove Favorite<vb:else />Add Favorite</vb:if>" />
HTML Code:
<!-- Site Info Popup --> <form action="javascript:void();" method="post" onsubmit="" id="siteinfo_popup_form"> <input type="hidden" name="s" value="" /> <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" /> <div id="siteinfo_popup" style="display: none;"> <div class="tborder"> <div class="nzbhead" style="padding:6px; padding-left: 60px;"> <img src="images/misc/close.png" alt="" onclick="SitePopup.Close()" style="cursor:pointer;float:right;margin-top:2px;" /> <span id="siteinfo_popup_title">Info</span> </div> <div class="nzbalt" style="padding:10px;"> <span id="siteinfo_popup_body" style="font-weight:bold;"></span> </div> </div> </div> </form> <script type="text/javascript"> <!-- Siteinfo_Popup = new Page_Popup('Siteinfo_Popup', 'siteinfo_popup', 500, 75, true); //--> </script> <!-- / Site Info Popup --> Code:
function Page_Popup(varname, elementid, popupwidth, overlayopacity, ignorereturn)
{
this.elementid = elementid;
this.varname = varname;
this.timer;
// position fixed for all except ie6 and lower...
if (is_ie && !is_ie7 && !is_ie8)
{
this.enabled = false;
}
else
{
this.enabled = true;
if (popupelement = fetch_object(elementid))
{
if (popupwidth)
{
this.popupwidth = popupwidth + "px";
}
else
{
this.popupwidth = "400px";
}
var element_properties = {
position: "fixed",
width: this.popupwidth,
top: "45%",
left: "50%",
marginLeft: "-" + (popupwidth/2) + "px",
zIndex: "1000"
};
for (var property in element_properties)
{
if (YAHOO.lang.hasOwnProperty(element_properties, property))
{
YAHOO.util.Dom.setStyle(popupelement, property, element_properties[property]);
}
}
this.popupelement = popupelement;
//this.popupelement.originalOpacity = YAHOO.util.Dom.getStyle(this.popupelement, 'opacity');
}
if (overlayopacity>1)
{
if (overlayopacity > 100)
{
overlayopacity = 100;
}
overlay = document.createElement('div');
var overlay_properties = {
top: "0px",
left: "0px",
right: "0px",
bottom: "0px",
display: "none",
position: "fixed",
backgroundColor: "#000000",
opacity: '0.' + overlayopacity
};
for (var property in overlay_properties)
{
if (YAHOO.lang.hasOwnProperty(overlay_properties, property))
{
YAHOO.util.Dom.setStyle(overlay, property, overlay_properties[property]);
}
}
this.Overlay = overlay;
}
}
this.Show = function()
{
returnvalue = true;
if (this.enabled)
{
// Hide vbmenu because it doesn't get covered with overlay...
vbmenu_hide();
if (typeof this.popupelement != 'undefined')
{
YAHOO.util.Dom.setStyle(this.popupelement, "opacity", this.popupelement.originalOpacity);
YAHOO.util.Dom.setStyle(this.popupelement, "display", "");
returnvalue = false;
}
if (typeof this.Overlay != 'undefined')
{
YAHOO.util.Dom.setStyle(document.body.appendChild(this.Overlay), "display", "");
}
}
if (!ignorereturn)
{
return returnvalue;
}
}
this.Close = function()
{
if (this.enabled)
{
this.ClearTimer();
if (typeof this.popupelement != 'undefined')
{
//this.Anim = new YAHOO.util.Anim(this.popupelement, {opacity:{to: 0}}, 0.25);
//if (this.Anim.animate())
//{
//this.Anim.onComplete.subscribe(this.DoClose, this, true);
//}
//else
//{
this.DoClose();
//}
}
}
}
this.DoClose = function()
{
if (typeof this.popupelement != 'undefined')
{
YAHOO.util.Dom.setStyle(this.popupelement, "display", "none");
}
if (typeof this.Overlay != 'undefined')
{
//overlay = document.body.appendChild(this.Overlay);
YAHOO.util.Dom.setStyle(document.body.appendChild(this.Overlay), "display", "none");
}
}
this.TimerClose = function(waittime)
{
this.timer = window.setTimeout( this.varname + ".Close()", waittime );
}
this.ClearTimer = function()
{
if (this.timer)
{
window.clearTimeout(this.timer);
}
}
}
//
// Site Info Popup
//
SitePopup = new siteinfo_popup('Siteinfo_Popup','siteinfo_popup');
function siteinfo_popup(varname,elementid)
{
this.elementid = elementid;
this.varname = varname;
this.CloseFunc = false;
this.Show = function(title,text,timewait,func,closefunc,form)
{
if (func)
{
eval(func);
}
if (form)
{
if (formobj = fetch_object(this.elementid + '_form'))
{
formobj.name = (form['name'] ? form['name'] : '');
formobj.action = (form['action'] ? form['action'] : '');
formobj.onsubmit = (form['onsubmit'] ? form['onsubmit'] : '');
formobj.method = (form['method'] ? form['method'] : '');
}
}
if (closefunc)
{
this.CloseFunc = closefunc;
}
if (titleobj = fetch_object(this.elementid + '_title'))
{
titleobj.innerHTML = title;
}
if (bodyobj = fetch_object(this.elementid + '_body'))
{
bodyobj.innerHTML = text;
}
eval(this.varname + '.Show()');
if (timewait)
{
this.TimerClose(timewait);
}
}
this.Close = function()
{
if (this.CloseFunc)
{
eval(this.CloseFunc);
}
eval(this.varname + '.Close()');
}
this.TimerClose = function(timewait)
{
eval(this.varname + '.TimerClose(' + timewait + ')');
}
}
|
|
#9
|
||||
|
||||
|
Let me get this straight.... is this what is showing up in the page source? Or is this the template?
HTML Code:
<img id="reminder_15_toggler" src="clear.gif" class="reminder_toggler<vb:if condition="$show['fav']">_active</vb:if>" onclick="FAVReminder.Toggle(15);" title="<vb:if condition="$show['fav']">Remove Favorite<vb:else />Add Favorite</vb:if>" />
|
|
#10
|
|||
|
|||
|
this is the page source:
HTML Code:
<img id="nzbreminder_201_toggler" src="clear.gif" class="nzbreminder_toggler" title="Add Favorite">
HTML Code:
<img id="reminder_{vb:raw favid}_toggler" src="clear.gif" class="reminder_toggler<vb:if condition="$show['fav']">_active</vb:if>" onclick="FAVReminder.Toggle({vb:raw favid});" title="<vb:if condition="$show['fav']">Remove Favorite<vb:else />Add Favorite</vb:if>" />
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|