November 26, 2010

To concatenate two string using fwrite()

{php}
echo "{a href='sampl.php?id=hai'}Click Here{/a}";
if(isset($_REQUEST['id']))
{
$fp = fopen('data.txt', 'a');
//fwrite($fp, );
fwrite($fp, $_REQUEST['id']);
fclose($fp);


echo"authorize";
}
else
echo"Unauthorize";
{/php}

November 9, 2010

How To Make A Website Without Any Coding Knowledge - Joomla!

Module Positions

You can use this url to find out where all your modules are. Great to print out and keep as a reference:

www.yourjoomlawebsite.com/index.php?tp=1

November 3, 2010

Print the article title in the Joomla1.5 template

Print the title in the index.php where ever you want

PHP:

echo $mainframe->getPageTitle();

Remove home button from main menu in joomla1.5

Remove home button from main menu in joomla1.5

.menu li.item1
{
position:absolute;
left:0px;
top:-500px;
width:1px;
height:1px;
overflow:hidden;
}

While refreshing different color changing

Use this javascript:

var color=new Array(7);
color[0]="#246fcf";
color[1]="#0e9eb8";
color[2]="#0eb8b2";

function changeColor()
{
var ranNum= Math.floor(Math.random()*7);
document.getElementById('div1').style.backgroundColor=color[ranNum];
}


and use this onload function in the body tag

'[body onload="changeColor()"]'


eg:

[div id="div1" name="div1" style="height:5px;"][/div]

Round Corner using CSS(Border property)

Hi friends!

Let me share some useful tips for round corner in all browser support


Please find this link

http://code.google.com/p/curvycorners/

Official site:

http://www.curvycorners.net/

CSS positioning within a container

One of the best things about CSS is that you can position an object absolutely anywhere you want in the document. It's also possible (and often desirable) to position objects within a container. It's simple to do too. Simply assign the following CSS rule to the container:

#container
{
position: relative
}

Now any element within this container will be positioned relative to it. Say you had this HTML structure:

To position the navigation exactly 30px from the left and 5px from the top of the container box, you could use these CSScommands:

#navigation
{
position: absolute;
left: 30px;
top: 5px
}

Perfect! In this particular example, you could of course also use margin: 5px 0 0 30px, but there are some cases where it's preferable to use positioning.

Two classes together

Usually attributes are assigned just one class, but this doesn't mean that that's all you're allowed. In reality, you can assign as many classes as you like! For example:

[p class="text side"]...[/p]

Replace [ by <>

Using these two classes together (separated by a space, not with a comma) means that the paragraph calls up the rules assigned to both text and side. If any rules overlap between the two classes then the class which is below the other in the CSS document will take precedence.

CSS font shorthand rule

CSS tricks you may not know:

When styling fonts with CSS you may be doing this:

font-weight: bold;
font-style: italic;
font-variant: small-caps;
font-size: 1em;
line-height: 1.5em;
font-family: verdana,sans-serif

There's no need though as you can use this CSS shorthand property:

font: bold italic small-caps 1em/1.5em verdana,sans-serif

Much better! Just a few of words of warning: This CSS shorthand version will only work if you're specifying both thefont-size and the font-family. The font-family command must always be at the very end of this shorthand command, and font-size must come directly before this. Also, if you don't specify the font-weight, font-style, orfont-variant then these values will automatically default to a value of normal, so do bear this in mind too.

November 2, 2010

Use onclick instead of Hyperlink

onclick="window.location.replace('path');"

for eg: ' {a href="http://www.blogger.com/hyperlink" onclick="window.location.replace('path');"} text{/a}

For reload use just like refresh

onclick="window.location.reload();"

JavaScript Lightbox without JQuery

* The special feature for this lightbox is that
  • It works clearly on all browsers.
  • And it may provide lightbox facility to all need which developer focuses(display image,text,form,entire div element and so on)...
* A simple thing u need to do is just call the function openbox(1) via onclick,onmouseover...

* And mention the id="box" to the element u want to display under lightbox function.

* Before that u need to put the empty div with id="filter"

* Say for example

Element you want to display

[div id = "filter" ] [/ div ]
[ div id = "box" ] Element you want to display [/div]
[a href="JavaScript:void(0)" onclick="openbox(1)"]Click here to view lightbox[/a]


Note: Replace [ by < and ] by >

Demonstration:

August 25, 2010

Gallery Component for Joomla

JWallpapers

http://extensions.joomla.org/extensions/photos-a-images/photo-gallery/9236

Classifieds Component for Joomla

hi guys !

There are some useful joomla components for classified site

KSAdvertiser:
com_ksadvertiser.zip


Almond Classifieds Component for Joomla
jacl54gpl.zip

July 21, 2010

AUTHENTICATION WHILE DOWNLOADING for josdewplayer

AUTHENTICATION WHILE DOWNLOADING
-----------------------------------------------------------

CODE FOR GETTING THE LOGIN INFORMATION:

$jAp= & JFactory::getApplication();
$user =& JFactory::getUser();
$user_id=$user->get('id');//variable $user_id hold user login_id
$user_username=$user->get('username');variable $user_username hold user login_username

VERIFICATION WHETHER THE USER IS AUTHORIZED PERSON OR NOT:

$refer_variable//may be $user_id or $user_username
$result=mysql_query("select * from jos_users where id='$refer_variable'");


PLUGIN NAME::::::::::josdewplayer_plugin.zip

FILE TO BE EDIT::::::josdewplayer.php

PATH FOR THE FILE:”\joomla\plugins\content\”


-------------Put onclick() event in the file josdewplayer.php

Line::::::4th line from bottom

$text = '{ type="application/x-shockwave-flash" data="'. $LiveSite .'plugins/content/'.$player. $path .'&autoplay='.$autoplay.'&autoreplay='.$autoreplay.'&showtime=1" onclick="test()" width="'.$width.'" height="20">
">


test(){
var id="{php echo $user_id;}";
if(id=="") window.location ="";////path to regiteration login form

alert("U must register or login before accessing it");
}
else
{

alert("Authorized user");

alert("U may now acess it");
}

}

{/script}

LOGIN-MODULE DATABASE NAME::::::: jos_users


LOGIN-MODULE DATABASE NAME::::::: jos_users


LOGIN-MODULE DATABASE NAME::::::: jos_users


SHORT PROCEDURE:::

---------->PUT onclick() event .Because while user try to dowload it will invoke

--------->In onclick() function. Redirect the page to registeration form page for registeration

---------->Get the User_login_id.It may be new user or old-user logination

--------->So for old-user.. U must check his availabilty by SELECT sql function.

---------->After registeration...permitt the user to download the desire content

Gantry Framework - Flexible and Powerful Web Platform

How does Gantry make theming easier and more powerful?

Gantry is a comprehensive set of building blocks to enable the rapid development and realization of a design into a flexible and powerful web platform theme.

Gantry Overview

Gantry was born when the RocketTheme development team wanted to consolidate our extensive set of custom Joomla template functionality into a simple, easy to use framework. However, we wanted to ensure we didn’t lock ourselves into a rigid framework that would stifle the creativity and bleeding-edge design features that we had become known for. It had to be powerful enough to do everything our templates already handled, but allow us to easily extend and build-on these features with a minimum of effort and complexity.

We wanted to have a solid base we could build on top of when creating a new Joomla template. Anything that was common to all templates was a prime candidate to be put in the core of Gantry, and anything specific to the template design itself should be part of the template itself. Traditionally the Joomla layout options are limited, but Gantry was built to provide a new layer on top of this traditional module configuration to give an unprecedented level of control and flexibility.


Refer : http://www.gantry-framework.org/

How to get user id in joomla1.5

hi guys


defined('_JEXEC') OR defined('_VALID_MOS') OR die( "Direct Access Is Not Allowed" );

echo "Hello";
echo "

User: ";

$jAp= & JFactory::getApplication();
$user =& JFactory::getUser();
$user->get('id');
echo $user;
?>

July 7, 2010

Multi language option in PHP

hi guys

i'm going to share multi language option in PHP

<*? $_REQUEST["lang"]==1?include('en.php'):include('fr.php'); ?>

<**a href="langauge.php?lang=1"*>English<*/a*><*a href="langauge.php?lang=2"*>French<*/a*>

<*table width="100%" border="1" cellspacing="0" cellpadding="0"**>

<*tr*>



<*th scope="col"*><*?php echo _CMN_NAME; ?*><*/th*>



<*/tr*>

<*/table*>

use as index.php

and make two files to define macro for languages

en.php

fr.php

en.php

<*?PHP DEFINE('_CMN_NAME','Name'); ?>



fr.php

<*?PHP DEFINE('_CMN_NAME','Nom'); ?>


Note: Guys please remove Astrix *

March 6, 2010

Getting started with Magento widgets

Just a follow up on my previous post over at Inchoo.net site. I have placed a copy of my blank Magento widget extension to be available for download here on ActiveCodeline as well.

Download [ ActiveCodeline_WidgetOne.tar ].

Creating a new product type in Magento

Given the complexity of Magento, here is a little module I wrote about on Inchoo.net site that might help you learn how to create your own product.

Download Ajzele_CustomProduct.