<?php ////// Setting(s) ///////////////////////////////////////////////////////////////////////////////// // // // Path where ThickBox is installed define(THICKBOX_PATH, "assets/snippets/thickbox3.1/"); // //include snippet file $output = ""; include($modx->config['base_path'].THICKBOX_PATH.'thickbox.php'); // /////////////////////////////////////////////////////////////////////////////////////////////////// return $output; ?>
<?php
//////////////////////////////////////////////////////////////////////////////////////////////////
//
// Logic code for ThickBox. Default parameter values can be changed in this file.
// Do not touch anything unless you know what you are doing.
//
//////////////////////////////////////////////////////////////////////////////////////////////////
global $modx;
if (!defined ('THICKBOX_PATH')){
$output = 'ThickBox setup path is not defined, please check the snippet code in MODx manager.';
return;
}
///////////////////////////////////////////////////////////////////////////////////////////////////
// CSS integration
$thickbox_css_link = '<link rel="stylesheet" href="'. $modx->config['base_url'] . THICKBOX_PATH . 'thickbox.css" type="text/css" media="screen" />';
$modx->regClientCSS($thickbox_css_link);
///////////////////////////////////////////////////////////////////////////////////////////////////
// js script integration
$thickbox_js_1 = $modx->config['base_url'] . THICKBOX_PATH . 'jquery-latest.pack.js';
$thickbox_js_2 = $modx->config['base_url'] . THICKBOX_PATH . 'thickbox-compressed.js';
$output = 'HALLO';
$modx->regClientStartupScript($thickbox_js_1);
$modx->regClientStartupScript($thickbox_js_2);
///////////////////////////////////////////////////////////////////////////////////////////////////
// Default values (can be overridden in the snippet call),
// No need to edit unless you know what you're doing!
//
// here a example:
// ^$mgconfig['debug'] = (isset($debug)) ? $debug : 0; //[0 | 1] display debug trace
$mgconfig['embedtype'] = (isset($embedtype)) ? $embedtype : "thickbox"; // [thickbox] at the moment the only one
$mgconfig['title'] = (isset($title)) ? $title : "Please Sign In"; // [ text ]
$mgconfig['page'] = (isset($page)) ? $page : "assets/snippets/thickbox3.1/ajaxLogin.html"; // [ text ]
$mgconfig['height'] = (isset($height)) ? $height : "85"; // [ height of box ]
$mgconfig['width'] = (isset($width)) ? $width : "250"; // [ width of box ]
$mgconfig['modal'] = (isset($modal)) ? $modal : "true"; // [ true | false ]
$mgconfig['buttontxt'] = (isset($buttontxt)) ? $buttontxt : "Login"; // [ text ]
///////////////////////////////////////////////////////////////////////////////////////////////////
// Build the link to call the html page, example call:
// <a href="ajaxLogin.html?height=85&width=250&modal=true" class="thickbox" title="Please Sign In">login (modal)</a>
<a href="$page?$height&$width&$modal" class="$embedtype" title="$title">$buttontxt</a> ;
$output = $tpl->Render();
return;
?>
Testseite fürs Login mit snippet ohne css: [[ThickBox &embedtype="thickbox" &title="Please Sign In" &page="assets/snippets/thickbox3.1/ajaxLogin.html" &height="85" &width="250" &modal="true" &buttontxt="Login"]]
<table border="0" cellpadding="3" cellspacing="3" style="margin:0 auto;" >
<tr>
<td><label>Username</label>
:</td>
<td><input name="" type="text" size="20"></td>
</tr>
<tr>
<td><label>Password</label>
:</td>
<td><input name="" type="text" size="20"></td>
</tr>
<tr align="right">
<td colspan="2"><input type="submit" id="Login" value=" Login "> <input type="submit" id="Login" value=" Cancel " onclick="tb_remove()"></td>
</tr>
</table>
<html> <script type="text/javascript" src="jquery-latest.pack.js"></script> <script type="text/javascript" src="thickbox-compressed.js"></script> <style type="text/css" media="all">@import "thickbox.css";</style> <head> <title>TESTSEITE</title> </head> <body> <a href="test.html?height=85&width=250&modal=true" class="thickbox" title="Please Sign In">login (modal)</a> </body> </html>

$output = $tpl->Render();
<?php ////// Setting(s) ///////////////////////////////////////////////////////////////////////////////// // // // Path where ThickBox is installed define(THICKBOX_PATH, "assets/snippets/thickbox/"); // //include snippet file $output = ""; include($modx->config['base_path'].THICKBOX_PATH.'thickbox.php'); // /////////////////////////////////////////////////////////////////////////////////////////////////// return $output; ?>
<?php
//////////////////////////////////////////////////////////////////////////////////////////////////
//
// Logic code for ThickBox. Default parameter values can be changed in this file.
// Do not touch anything unless you know what you are doing.
//
//////////////////////////////////////////////////////////////////////////////////////////////////
global $modx;
if (!defined ('THICKBOX_PATH')){
$output = 'ThickBox setup path is not defined, please check the snippet code in MODx manager.';
return;
}
///////////////////////////////////////////////////////////////////////////////////////////////////
// CSS integration
$thickbox_css_link = '<link rel="stylesheet" href="'. $modx->config['base_url'] . THICKBOX_PATH . 'thickbox.css" type="text/css" media="screen" />';
$modx->regClientCSS($thickbox_css_link);
///////////////////////////////////////////////////////////////////////////////////////////////////
// js script integration
$thickbox_js_1 = $modx->config['base_url'] . THICKBOX_PATH . 'jquery-latest.pack.js';
$thickbox_js_2 = $modx->config['base_url'] . THICKBOX_PATH . 'thickbox-compressed.js';
// $output = 'HALLO';
$modx->regClientStartupScript($thickbox_js_1);
$modx->regClientStartupScript($thickbox_js_2);
///////////////////////////////////////////////////////////////////////////////////////////////////
// Default values (can be overridden in the snippet call),
// No need to edit unless you know what you're doing!
//
// here a example:
// ^$mgconfig['debug'] = (isset($debug)) ? $debug : 0; //[0 | 1] display debug trace
$embedtype = (isset($embedtype)) ? $embedtype : "thickbox"; // [thickbox] at the moment the only one
$title = (isset($title)) ? $title : "Please Sign In"; // [ text ]
$page = (isset($page)) ? $page : "assets/snippets/thickbox/ajaxLogin.html"; // [ text ]
$height = (isset($height)) ? $height : "85"; // [ height of box ]
$width = (isset($width)) ? $width : "250"; // [ width of box ]
$modal = (isset($modal)) ? $modal : "true"; // [ true | false ]
$buttontxt = (isset($buttontxt)) ? $buttontxt : "Login"; // [ text ]
///////////////////////////////////////////////////////////////////////////////////////////////////
// Build the link to call the html page, example call:
// <a href="ajaxLogin.html?height=85&width=250&modal=true" class="thickbox" title="Please Sign In">login (modal)</a>
$output = '<a href="'.$page.'?'.$height.'&'.$width.'&'.$modal.'" class="'.$embedtype.'" title="'.$title.'">'.$buttontxt.'</a>';
?>
What is this? It is not a standard MODx api function. Actually there are a few issues in your snippet. I will take a look and see if i can figure it out, my brain is jelly at the moment.$output = $tpl->Render();
Also that templates uses MooTools so there may still be a conflict with jQuery going on.
Edit: OK, I see what you have going here, you borrowed some code from MaxiGallery but it is not doing what you expect. Actually you made it more complicated than it needs to be.
<a class="" in="" sign="" please="" title="" thickbox="" true="" &="" 250="" 85="" ?="" ajaxlogin.html="" snippets="" assets="" href="">"Login"</a>
[!ThickBox? &embedtype=`thickbox` &title=`Please Sign In` &page=`assets/snippets/thickbox/ajaxLogin.html` &height=`85` &width=`250` &modal=`true` &buttontxt=`Login`!]
<!-- #declare:separator <hr> -->
<!-- login form section-->
<form method="post" name="loginfrm" action="[+action+]" style="margin: 0px; padding: 0px;">
<input type="hidden" value="[+rememberme+]" name="rememberme">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>User:</b></td>
<td><input type="text" name="username" tabindex="1" onkeypress="return webLoginEnter(document.loginfrm.password);" size="8" style="width: 150px;" value="[+username+]" /></td>
</tr>
<tr>
<td><b>Password:</b></td>
<td><input type="password" name="password" tabindex="2" onkeypress="return webLoginEnter(document.loginfrm.cmdweblogin);" style="width: 150px;" value="" /></td>
</tr>
<tr>
<td><label for="chkbox" style="cursor:pointer">Remember me: </label></td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><input type="checkbox" id="chkbox" name="chkbox" tabindex="4" size="1" value="" [+checkbox+] onclick="webLoginCheckRemember()" /></td>
<td align="right">
<input type="submit" value="[+logintext+]" name="cmdweblogin" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2"><a href="#" onclick="webLoginShowForm(2);return false;">Forget Password?</a></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<hr>
<!-- log out hyperlink section -->
<a href='[+action+]'>[+logouttext+]</a>
<hr>
<!-- Password reminder form section -->
<form name="loginreminder" method="post" action="[+action+]" style="margin: 0px; padding: 0px;">
<input type="hidden" name="txtpwdrem" value="0" />
<table border="0">
<tr>
<td>Enter the email address of your account <br />below to receive your password:</td>
</tr>
<tr>
<td><input type="text" name="txtwebemail" size="24" /></td>
</tr>
<tr>
<td align="right"><input type="submit" value="Submit" name="cmdweblogin" />
<input type="reset" value="Cancel" name="cmdcancel" onclick="webLoginShowForm(1);" /></td>
</tr>
</table>
</form>