Writing BR in XML
- July 31st, 2008
- Write comment
to do this we simply use
<![CDATA[ <br/> ]]>
Archive for July, 2008
I was trying to fix the TinyMCE for joomla 1.5 in all ways. None worked. I even went into the core files and tried to change them. Finally I found the sloution by adding those lines to my template CSS
.mceToolbarTop * {
float:left;
}
.mceToolbarTop select {
width:auto!important;
}
.mceToolbarTop option {
float:none;
}
this article is taken from Zen Cart Wiki http://www.zen-cart.com/wiki/index.php/Creating_new_pages
You may want to add additional pages to your Zen Cart™ store. Here are the basics steps you should follow. We will assume your new page is named myNewPage.
In order for the Zen Cart™ system to pick up the new page, you will need to include four components:
It’s important that all these new components use the same name for your new page. (The only partial exception is the extra_datafiles file; see below.) Be sure that your new pages directory name, language file name, and template file name use exactly the same name for your new page.
At a minimum, this file should contain the following:
<?php // // +----------------------------------------------------------------------+ // |zen-cart Open Source E-commerce | // +----------------------------------------------------------------------+ // | Copyright (c) 2006 The zen-cart developers | // | | // | http://www.zen-cart.com/index.php | // | | // | Portions Copyright (c) 2003 osCommerce | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.0 of the GPL license, | // | that is bundled with this package in the file LICENSE, and is | // | available through the world-wide-web at the following url: | // | http://www.zen-cart.com/license/2_0.txt. | // | If you did not receive a copy of the zen-cart license and are unable | // | to obtain it through the world-wide-web, please send a note to | // | license@zen-cart.com so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // $Id: header_php.php $ // require(DIR_WS_MODULES . 'require_languages.php'); $breadcrumb->add(NAVBAR_TITLE); ?>
Additionally, you can add in whatever processing you need to do on your page to this file. Have a look at the other pages in the includes/modules/pages/ directory to get an idea of what this file is for.
The new template file, includes/templates/template_default/templates/tpl_myNewPage_default.php, contains the main HTML body for your page. A good starting point for this page is to copy one of the other pages in this directory and adjust it to fit your new page’s desired format.
This file, includes/extra_datafiles/myNewPage.php, should contain the following line:
<?php define(FILENAME_MYNEWPAGE, 'myNewPage'); ?>
The constant on the left, FILENAME_MYNEWPAGE, is the tag you will use to link to your new page from other locations in your shop. The string on the right, myNewPage, must exactly match the name of your new includes/modules/pages/ directory.
The language file for your page should contain definitions for all the local text elements on your page; for example:
<?php
define('NAVBAR_TITLE', 'New Page');
define('HEADING_TITLE','My Cool New Page');
?>
Other languages
Using the rhuk_milkyway template as an example, here is a brief summary of the priniciples we’ve looked at.
To override a component layout (for example the default layout in the article view), copy:
/components/com_content/views/article/tmpl/default.php
to:
/templates/rhuk_milkyway/html/com_content/article/default.php
Read more about component output.
To override a module layout (for example the Latest News module using the rhuk_milkyway template), copy:
/components/mod_latest_news/default.php
to:
/templates/rhuk_milkyway/html/mod_latest_news/default.php
Read more about module output.
To add new module styles (chrome), add them to the following file:
/templates/rhuk_milkyway/html/modules.php
Read more about module styles.
To customise the way the items-per-page selector and pagination links display, edit the following file:
/templates/rhuk_milkyway/html/pagination.php
Read more about pagination.
To override joomla menu module (whether its left or right or upper one ) you have to copy the following file :
/templates/system/html/modules.php
to your template
/templates/yourtemplate/html/modules.php
and overright the function you want.
ofcourse you can also create your own menu module just you add a function to modules.php
/*
* Module chrome that wraps the module in a definition list
*/
function modChrome_dlist($module, &$params, &$attribs)
{ ?>
<dl class="<?php echo $params->get('moduleclass_sfx'); ?>">
<?php if ($module->showtitle != 0) : ?>
<dt>
<?php echo $module->title; ?>
</dt>
<?php endif; ?>
<dd>
<?php echo $module->content; ?>
</dd>
</dl>
<?php
}
then you can add this when calling the menu module
<jdoc:include type="modules" name="left" style="dlist" />
the default styles are :
was before :
talking about integrating phpbb3 users to joomla.
I’ve tried JFUSION and darn its the worst module I have ever used (its so messed up and complicated more than expected)
I’ve tried to find another and hopelessly, I found nothing that can help me to do that COMPLICATED job (being sarcastic if you havnt figured that yet) honestly I was starting to make one on my own but wait wait there is a great one out there called rokbridge, or ROKBRIDGE.
And yes its the best it creates a non-invasive bridge solution for the fantastic new phpBB3 forum package.
you can check it here :
http://www.rocketwerx.com/products/rokbridge/
The first problem faced me while trying to upload is not being able to upload using Media manager at all.
to solve this problem I’ve added those two lines to .httaccess
SecFilterEngine Off
SecFilterScanPOST Off
Now the second problem was not being able to upload in front end, and to solve this problem did the following :
Go to admin panel -> Site Menu -> Global Configuration -> System -> Enable Flash Uploader (Set to no)
and thats it!
this article is taken from :
http://simplythebest.net/scripts/ajax/ajax_password_strength.html
AUTHOR: Digital Spaghetti TYPE: Open Source MIT License BROWSERS: JavaScript enabled IE 6.0+, FF 1.5+, Safari 2.0+, Opera 9.0+To install the script on your Web page follow these instructions:
1) Download this ZIP file with jQuery 1.2.1 and jquery.pstrength-min.1.2.js. Unpack the files and upload both to your server.
2) Insert this anywhere before the password field on the page:
<script type=”text/javascript” src=”js/jquery.js”></script> // adjust the path as is required
<script type=”text/javascript” src=”js/jquery.pstrength-min.1.2.js”>
</script>
<script type=”text/javascript”>
$(function() {
$(‘.password’).pstrength();
});
</script>
3) Insert class=”password” into your input box tag to identify a password box:
<INPUT class=”password” type=password name=”Password”>
4) Insert these tags into your CSS and modify as is needed:
.password {
font-size : 12px;
border : 1px solid #cc9933;
width : 200px;
font-family : arial, sans-serif;
}
.pstrength-minchar {
font-size : 10px;
}
You can adjust a few more settings inside the jquery.pstrength-min.1.2.js script, such as messages, length/height of the bar, and so forth.
preparing the query
// Get a database object $db = JFactory::getDBO(); $query = "SELECT * FROM #__example_table WHERE id = 999999"; $db->setQuery($query);
of course using the Database
Basic Query Execution
- query (This should be user after Set Query if you want to use getNumRows)
Query Execution Information
- getAffectedRows
-explain
-insertidInsert Query Execution
-insertObject
Single Value Result
-loadResult
Single Row Results
-loadObject
-loadRow
-loadResultArray
Multi-Row Results
-loadObjectList
-loadRowList
-loadAssocList
Misc Result Set Methods
-getNumRows
a nice code would go like
$database = JFactory::getDBO();
$user_name=$_POST['username'];
$query = "SELECT * FROM #__users";
$database->setQuery($query);
$existing_users=$database->loadResultArray();
if (in_array($user_name, $existing_users)) {.. do something }
Transparent PNG on Internet explorer can be a bit painful but here is a code that can somehow solve the problem on IE6 and earlier (didn’t try it on a version earlier than IE6 honestly)
<SPAN
style=”DISPLAY: inline-block; FILTER: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’images/my-image.png’); WIDTH: 120px; HEIGHT: 74px”><IMG
style=”FILTER: progid:DXImageTransform.Microsoft.Alpha(opacity=0)” height=74
src=”images/my-image.png” width=120></SPAN>