MyBB Community Forums

Full Version: where is {$misc_info_link} defined
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all
I'm look for where {$misc_info_link} is defined as I wish to change the resultant mybbpopup window to a jquery window ... I just don't seem to be able to find its definition anywhere
Variable is called here:
Theme Templates > Moderator Control Panel Templates > modcp_ipsearch_results

Popup window template defined here:
Theme Templates > Moderator Control Panel Templates > modcp_ipsearch_misc_info
(2012-07-31, 06:57 PM)effone Wrote: [ -> ]Variable is called here:
Theme Templates > Moderator Control Panel Templates > modcp_ipsearch_results

Popup window template defined here:
Theme Templates > Moderator Control Panel Templates > modcp_ipsearch_misc_info

Thats far as I got the variable must contain the call to mybbpopupwindow
Example
<a href="#" onclick="MyBB.popupWindow('{$mybb->settings['bburl']}/misc.php?action=buddypopup', 'buddyList', 350, 350);">{$lang->welcome_open_buddy_list}</a>
uses the mybb.popupwindow to open the buddy list and is located in the header welcomeblock templates. I cannot find the function call
Example
<a href="#" onclick="MyBB.popupWindow('{$mybb->settings['bburl']}/modcp.php?action=iplookup&ipaddress=$some_variable', 'some text', 350, 350);">{$lang->some_ip_vrariable}</a>
I could replace {$misc_info_link} in the template with code but really I was looking for the actual call to open the window so I could maintain the code across themes more easily
OK. then I think this is here:
moderation_getip_modoptions

<tr>
<td class="trow2"><strong>{$lang->mod_options}</strong></td>
<td class="trow2">
	<a href="modcp.php?action=ipsearch&amp;ipaddress={$post['ipaddress']}&amp;search_users=1">{$lang->search_ip_users}</a><br />
	<a href="modcp.php?action=ipsearch&amp;ipaddress={$post['ipaddress']}&amp;search_posts=1">{$lang->search_ip_posts}</a><br />
	<a href="modcp.php?action=iplookup&ipaddress={$post['ipaddress']}" onclick="MyBB.popupWindow('{$mybb->settings['bburl']}/modcp.php?action=iplookup&ipaddress={$post['ipaddress']}', 'iplookup', 500, 250); return false;">{$lang->info_on_ip}</a>
</td>
</tr>
I left this alone for some while but found the definition to be in modcp.php at line 2739, the is a point from this though you can do away with the {$misc_info_link} variable in the modcp_ipsearch_results template and replace that with your own code
Example
<script>
jQuery(document).ready(function(){
assign the ColorBox event to elements
				
				jQuery(".iframe").colorbox({iframe:true, width:"40%", height:"40%",opacity:"0.1"});
				
                        	});
		</script>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
						<tr>
							<td class="thead" align="center" colspan="2">
								<div class="float_right button"><a class= "iframe" href="modcp.php?action=iplookup&ipaddress={$mybb->input['ipaddress']}"  id="link_content2">{$lang->info_on_ip}</a></div>
<div><strong>{$lang->ipsearch_results}</strong></div>
							</td>
						</tr>
						<tr>
							<td class="tcat" width="15%" align="center"><span class="smalltext"><strong>{$lang->ipaddress}</strong></span></td>
							<td class="tcat"><span class="smalltext"><strong>{$lang->result}</strong></span></td>
						</tr>
						{$results}
					</table>
					{$multipage}
					<br />
as you can see I have used the colorbox jquery plugin to replace the original mybb popup window but you could use the default if you wish

[attachment=28416]
[attachment=28417]