If you want a cool lightbox effect to be able to open up external links in an iframe then Squeezebox is the tool for you. And the good news is that it's already installed in Joomla 1.5. The only thing you have to do is activate it.
Instructions on how to do this are here. http://www.scribd.com/doc/2299973/Joomla-v-15-Squeezebox-in-your-Joomla-Website
BUT in the code in this tutorial they use '? >' if you copy this like for like then this will crash your website. you'll need to change this to '?>'
Heres the code that you need to enter in the 'TEMPLATE HTML EDITOR'
#################################################
<script type="text/javascript" src="<?php echo $this->baseurl ? >
/media/system/js/modal.js"> </script>
<link rel="stylesheet" href="<?php echo $this->baseurl ?
>/media/system/css/modal.css" type="text/css" />
<script type="text/javascript">
// <!--
window.addEvent('domready', function(){ var JTooltips = new Tips($$('.hasTip'), { maxTitleChars: 50, fixed: 'false'}); });
// -->
</script>
<script type="text/javascript">
// <!-
window.addEvent('domready', function() {
SqueezeBox.initialize({});
$$('a.modal').each(function(el) {
el.addEvent('click', function(e) {
new Event(e).stop();
SqueezeBox.fromElement(el);
});
});
});
// -->
</script>
################################################################
and in the article you want to call this effect up
<a rel="{handler: 'iframe', size: {x: width, y: height}}" href="address" class="modal">link name</a>
Thursday, 28 May 2009
Thursday, 14 May 2009
Pimp your Firefox with free Internet Development tools
Thanks to the Classes.org email newsletter I received the following list of Internet Development tools that can be added to Mozilla Firefox.
Mozilla Firebug is one that I've been using for a couple of months now and have raved about it in my blog before. It's excellent for working with CSS and you can even change things live. Here are a few more tools that I will be checking over the next couple of weeks. And best of all its all FREE - thank you FireFox.
FirePHP
Extension of the Firebug add-on to show PHP debug information on Firebug console.
https://addons.mozilla.org/en-US/firefox/addon/6149
- YSlow
Currently another extension of the Firebug add-on to measure page loading times and identify problems that make your pages load slower.
https://addons.mozilla.org/en-US/firefox/addon/5369
- Web Developer
Several tools like disabling Java-script, CSS, redirection, clearing browser caches, resizing the browser window to test pages with different sizes, etc..
https://addons.mozilla.org/en-US/firefox/addon/60
- User Agent Switcher
Switch the browser identification to test how sites respond to different browsers.
https://addons.mozilla.org/en-US/firefox/addon/59
- HTML Validator
Validate page HTML to help finding page generation errors cause by eventual bugs in the PHP scripts.
https://addons.mozilla.org/en-US/firefox/addon/249
- Java-Script debugger
Run page Java-script code with single step support and ability to show Java-script variable values during debugging.
https://addons.mozilla.org/en-US/firefox/addon/216
- LiveHTTPHeaders
Show page request and response headers.
https://addons.mozilla.org/en-US/firefox/addon/3829
Mozilla Firebug is one that I've been using for a couple of months now and have raved about it in my blog before. It's excellent for working with CSS and you can even change things live. Here are a few more tools that I will be checking over the next couple of weeks. And best of all its all FREE - thank you FireFox.
FirePHP
Extension of the Firebug add-on to show PHP debug information on Firebug console.
https://addons.mozilla.org/en-US/firefox/addon/6149
- YSlow
Currently another extension of the Firebug add-on to measure page loading times and identify problems that make your pages load slower.
https://addons.mozilla.org/en-US/firefox/addon/5369
- Web Developer
Several tools like disabling Java-script, CSS, redirection, clearing browser caches, resizing the browser window to test pages with different sizes, etc..
https://addons.mozilla.org/en-US/firefox/addon/60
- User Agent Switcher
Switch the browser identification to test how sites respond to different browsers.
https://addons.mozilla.org/en-US/firefox/addon/59
- HTML Validator
Validate page HTML to help finding page generation errors cause by eventual bugs in the PHP scripts.
https://addons.mozilla.org/en-US/firefox/addon/249
- Java-Script debugger
Run page Java-script code with single step support and ability to show Java-script variable values during debugging.
https://addons.mozilla.org/en-US/firefox/addon/216
- LiveHTTPHeaders
Show page request and response headers.
https://addons.mozilla.org/en-US/firefox/addon/3829
Wednesday, 6 May 2009
Recreating the Joomla 1.5 password from an outside application
The Problem: What I need to do is recreate the procedure that arrives me at the hashed password that is stored in my user table on our mysql database. that has been created by joomla.
_> this post http://forum.joomla.org/viewtopic.php?f=432&t=207689
has the following tip.
###############################
Joomla! 1.5 uses md5 to hash the passwords. When the passwords are created, they are hashed with a 32 character salt that is appended to the end of the password string. The password is stored as {TOTAL HASH}:{ORIGINAL SALT}.
To see how this is tested for authentication take a look at plugins/authentication/joomla.php lines 80-116.
###################################
so here's the solution .
-> we do a mysql search on the username and get the password.
-> split it at : and the second part is the Salt.
-> $pwd_partone = md5($pwd.$salt);
$pwd = $pwd_partone.':'.$salt;
and we should be able to get in.
Here's the code I have that works ->
// let's find out what the passwrod in the database is for this user
$sql1 = "SELECT * FROM jos_users WHERE username = '$uid'";
$rst1 = mysql_query($sql1);
$row1 = mysql_fetch_array($rst1);
$full_password = $row1['password'];
// now we have the password we'll need to split it into 2 at the ':' mark
$password_array = explode(':', $full_password);
// let's name those two elements to make it clear what's going on
list($full_hashed_password,$salt) = $password_array ;
// the next bit adds the salt to the pwd we have entered from our form
$pwd_partone = md5($pwd.$salt);
// let's rebuild the new password so we can check it against the one we have in the database
$pwd_revised = $pwd_partone.':'.$salt;
// all good to check now
if ( $pwd_revised == $full_hashed_password){
echo 'the password matches';
$login_success = TRUE;
} else {
echo 'the password doesn't match :(';
$login_success = FALSE;
}
?>
BE WARNED THOUGH
it's not over yet though the next stage is to make sure you check the privlages. at present all users will have access - unless that's what you want of course.
_> this post http://forum.joomla.org/viewtopic.php?f=432&t=207689
has the following tip.
###############################
Joomla! 1.5 uses md5 to hash the passwords. When the passwords are created, they are hashed with a 32 character salt that is appended to the end of the password string. The password is stored as {TOTAL HASH}:{ORIGINAL SALT}.
To see how this is tested for authentication take a look at plugins/authentication/joomla.php lines 80-116.
###################################
so here's the solution .
-> we do a mysql search on the username and get the password.
-> split it at : and the second part is the Salt.
-> $pwd_partone = md5($pwd.$salt);
$pwd = $pwd_partone.':'.$salt;
and we should be able to get in.
Here's the code I have that works ->
// let's find out what the passwrod in the database is for this user
$sql1 = "SELECT * FROM jos_users WHERE username = '$uid'";
$rst1 = mysql_query($sql1);
$row1 = mysql_fetch_array($rst1);
$full_password = $row1['password'];
// now we have the password we'll need to split it into 2 at the ':' mark
$password_array = explode(':', $full_password);
// let's name those two elements to make it clear what's going on
list($full_hashed_password,$salt) = $password_array ;
// the next bit adds the salt to the pwd we have entered from our form
$pwd_partone = md5($pwd.$salt);
// let's rebuild the new password so we can check it against the one we have in the database
$pwd_revised = $pwd_partone.':'.$salt;
// all good to check now
if ( $pwd_revised == $full_hashed_password){
echo 'the password matches';
$login_success = TRUE;
} else {
echo 'the password doesn't match :(';
$login_success = FALSE;
}
?>
BE WARNED THOUGH
it's not over yet though the next stage is to make sure you check the privlages. at present all users will have access - unless that's what you want of course.
Friday, 1 May 2009
joomla 1.0.15 Cookies must be enabled. login problem
The Problem;
Using login on our home page ( not admin - that works fine ) on the first attempt I get the message 'Cookies must be enabled!' - on the second sometimes third attempt it goes blank but has accepted as when returning to the screen I'm logged in. This is the same for me on FF and IE but Safari doesn't allow at all.
The solution:
I found the solution in this post http://forum.joomla.org/viewtopic.php?f=36&t=268622&start=60
there are many things to try, this is what worked for me.
edit configuration.php. Change the $mosConfig_live_site to have the "www". For Example - http://yourdomain.com becomes http://www.yourdomain.com.
Using login on our home page ( not admin - that works fine ) on the first attempt I get the message 'Cookies must be enabled!' - on the second sometimes third attempt it goes blank but has accepted as when returning to the screen I'm logged in. This is the same for me on FF and IE but Safari doesn't allow at all.
The solution:
I found the solution in this post http://forum.joomla.org/viewtopic.php?f=36&t=268622&start=60
there are many things to try, this is what worked for me.
edit configuration.php. Change the $mosConfig_live_site to have the "www". For Example - http://yourdomain.com becomes http://www.yourdomain.com.
Wednesday, 22 April 2009
Inserting a table into Magento store description creating line space.
Here's a quick one.
The Problem: When inserting a table into the descriptions field inside the admin area of a Magento store the output creates line spaces - resulting in 'br' tags on your page.
The solution: you need to take the spaces out of your code
for example you may have
<tr>
<td>hello</td>
</tr>
<tr>
<td>world</td>
</tr>
you'll need to change this to
<tr><td>hello</td></tr><tr><td>world</td></tr>
Then you will not have any spaces in the output. Just a very confusing view of spaghetti code to work though in descriptions tho.
The Problem: When inserting a table into the descriptions field inside the admin area of a Magento store the output creates line spaces - resulting in 'br' tags on your page.
The solution: you need to take the spaces out of your code
for example you may have
<tr>
<td>hello</td>
</tr>
<tr>
<td>world</td>
</tr>
you'll need to change this to
<tr><td>hello</td></tr><tr><td>world</td></tr>
Then you will not have any spaces in the output. Just a very confusing view of spaghetti code to work though in descriptions tho.
Tuesday, 31 March 2009
Magento 'shipping Invalid Country' - Setting up Shipping details in Magento
The section to make changes to shipping can be found at:
Magento Admin > System > Configuration > Shipping Methods(left hand menu)
At least this is the section where you can enable the methods that you'd
like to allow for shipping.
If you want to make changes to the table rate then you need to go to the
'store view' - This is in the dropdown list on the left hand side at the
top - and is labelled 'Current Configuration Scope:' - and move to your
main store view.
>> After that navigate back to shipping methods on the left hand menu. THis
time you will see and export button and a input field you can browse for the
document you wish to upload.
>> Simple export the file - make you changes and then import here again.
On doing this I got a 'Invalid Country ' message on all my countries. To see
the values you need to enter here visit
http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3
Magento Admin > System > Configuration > Shipping Methods(left hand menu)
At least this is the section where you can enable the methods that you'd
like to allow for shipping.
If you want to make changes to the table rate then you need to go to the
'store view' - This is in the dropdown list on the left hand side at the
top - and is labelled 'Current Configuration Scope:' - and move to your
main store view.
>> After that navigate back to shipping methods on the left hand menu. THis
time you will see and export button and a input field you can browse for the
document you wish to upload.
>> Simple export the file - make you changes and then import here again.
On doing this I got a 'Invalid Country ' message on all my countries. To see
the values you need to enter here visit
http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3
Monday, 30 March 2009
VBulletin : Front page message that only displays if logged in
On a job to update vBulletin here is a code snippet that so you can display a personalised message for your logged in users. Or display another message if their not.
This is just an example as this text is already include by default, howwever you may want to change it to something else.
<!-- welcome msg start DJ -->
<if condition="THIS_SCRIPT == 'index'">
<if condition="$bbuserinfo['userid'] == 0">
<br>
<table class="tborder" cellpadding="6" cellspacing="1" border="1" width="100%" align="center">
<thead>
<tr align="left">
<td class="tcat"> Welcome to the Forum.
</td>
</tr>
<tr align="center">
<td class="alt1"> If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. tst
</td>
</tr>
</thead>
</table>
<br>
<else />
<br>
<table class="tborder" cellpadding="6" cellspacing="1" border="1" width="100%" align="center">
<thead>
<tr align="left">
<td class="tcat">
Welcome back, $bbuserinfo[username].
</td>
</tr>
<tr align="center">
<td class="alt1"> <a href="search.php?do=getnew">Click here to view new posts</a>.</td>
</tr>
</thead>
</table>
<br>
There's a really handy list of conditional commands for vBulletin at this address
http://forum.vbulletinsetup.com/f18/vbulletin-template-conditionals-list-2185.html
</if>
</if>
<!-- welcome msg end DJ -->
This is just an example as this text is already include by default, howwever you may want to change it to something else.
<!-- welcome msg start DJ -->
<if condition="THIS_SCRIPT == 'index'">
<if condition="$bbuserinfo['userid'] == 0">
<br>
<table class="tborder" cellpadding="6" cellspacing="1" border="1" width="100%" align="center">
<thead>
<tr align="left">
<td class="tcat"> Welcome to the Forum.
</td>
</tr>
<tr align="center">
<td class="alt1"> If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. tst
</td>
</tr>
</thead>
</table>
<br>
<else />
<br>
<table class="tborder" cellpadding="6" cellspacing="1" border="1" width="100%" align="center">
<thead>
<tr align="left">
<td class="tcat">
Welcome back, $bbuserinfo[username].
</td>
</tr>
<tr align="center">
<td class="alt1"> <a href="search.php?do=getnew">Click here to view new posts</a>.</td>
</tr>
</thead>
</table>
<br>
There's a really handy list of conditional commands for vBulletin at this address
http://forum.vbulletinsetup.com/f18/vbulletin-template-conditionals-list-2185.html
</if>
</if>
<!-- welcome msg end DJ -->
Subscribe to:
Posts (Atom)