Joomla Newbie

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Forum rules
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
Locked
ra1
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Fri Aug 31, 2012 11:04 am

Joomla Newbie

Post by ra1 » Fri Aug 31, 2012 11:12 am

Hi every one ,
I am New here. I have a Question about virtuemart.
I am using virtuemart for my project and I have made some chaned in user.php of controller ,
and its work fine . but now I want to save all the data in excel [censored] ,means my data should be stored in both phpmyadmin and excel [censored] so.. plz plz.. help me.
i am using joomla 1.5 and virtuemart 1.0.8

thank you, ???

Aidan38
Joomla! Ace
Joomla! Ace
Posts: 1351
Joined: Mon Aug 06, 2012 8:51 am
Location: France Grenoble
Contact:

Re: Joomla Newbie

Post by Aidan38 » Fri Aug 31, 2012 12:48 pm

Hello,
if you start a new website, especially if it's an ecommerce website, its better to use Joomla 2.5.
Books and tutorials about Joomla! http://cinnk.com
Create your online shop with Joomla! & HikaShop : http://cinnk.com/en/shop/create-your-on ... -paperback

ra1
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Fri Aug 31, 2012 11:04 am

Re: Joomla Newbie

Post by ra1 » Fri Aug 31, 2012 4:04 pm

thnx for repply sir........
bt right now i am working with 1.5 and my 90% site project is done i just has to add to code for storing database in excel also .. so unfortunatly now i cnt go for any other version ... so plz help me ...
if u know how to store data in both excel and phpmyadmin.. thn plz reply back..

thnxx...

Aidan38
Joomla! Ace
Joomla! Ace
Posts: 1351
Joined: Mon Aug 06, 2012 8:51 am
Location: France Grenoble
Contact:

Re: Joomla Newbie

Post by Aidan38 » Fri Aug 31, 2012 4:21 pm

You can do as you want, but Joomla 1.5 is going to be not supported anymore from september 2012...
You can read this article :

http://magazine.joomla.org/issues/Issue ... t-Strategy
Books and tutorials about Joomla! http://cinnk.com
Create your online shop with Joomla! & HikaShop : http://cinnk.com/en/shop/create-your-on ... -paperback

ra1
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Fri Aug 31, 2012 11:04 am

Re: Joomla Newbie

Post by ra1 » Sat Sep 01, 2012 4:56 am

thnx.... friend .. i'll try to move on 2.5.. if i can .. thnx for inforamtion

ra1
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Fri Aug 31, 2012 11:04 am

Re: Joomla Newbie

Post by ra1 » Mon Sep 03, 2012 8:29 am

hello ,, Aidan38


i have a bit of problem ..with image uploading in my project .... will u plz help me ...


this is my code for file uploading ...




//reads the name of the file the user submitted for uploading
$image=$_FILES['image']['name'];
//if it is not empty
if ($image)
{

//get the original name of the file from the clients machine
$filename = stripslashes($_FILES['image']['name']);
//get the extension of the file in a lower case format
$extension = $this->getExtension($filename);
echo $extension;
$extension = strtolower($extension);
//if it is not a known extension, we will suppose it is an error and will not upload the file,
//otherwise we will do more tests
if (($extension != "jpg") && ($extension != "jpeg") && ($extension != "png") && ($extension != "gif"))
{
echo "2";
//print error message
echo '<h1>Unknown extension!</h1>';
$errors=1;
}
else
{
//get the size of the image in bytes
//$oname=$_FILES['image']['tmp_name'] is the temporary filename of the file
//in which the uploaded file was stored on the server
$size=filesize($_FILES['image']['tmp_name']);

//compare the size with the maxim size we defined and print error if bigger
if ($size > MAX_SIZE*1024)
{
echo '<h1>You have exceeded the size limit!</h1>';
$errors=1;
}

//we will give an unique name, for example the time in unix time format

$image_name=$image;

$ran=rand(10000,9999);

//the new name will be containing the full path where will be stored (images folder)

$saveimage="images/stories/******/pictures/".$ran.$image_name;

$db=JFactory::getDBO();
$sql="SELECT *
FROM ".$db->nameQuote('table name')."
WHERE ".$db->nameQuote('image field of database')." = ".$db->quote($saveimage)."; ";
$db->setQuery($sql);
$count=$db->loadResult(); //$logos = $database->loadObjectList();
$row = $db->loadAssoc();

print_r($row);
if($resultx=$db->query()){

// unset($db);

}else{

$db->stderr();
}
$countval=$db->getNumRows( $resultx );

$data =new stdClass();
$data->id from database = JFactory::getUser()->id;
$data->image path from database= $saveimage;

if($countval==0){

echo $countval;

if($db->insertObject("table name", $data, 'id from database')){

unset($db);

}else{

$db->stderr();
}
}
else
{
if($db->updateObject("table name", $data, 'id from database')){

unset($db);

}else{

echo $db->stderr();
}
}



//we verify if the image has been uploaded, and print error instead
$copied = copy($_FILES['image']['tmp_name'], $saveimage);

if (!$copied)

{
echo '<h1>Copy unsuccessfull!</h1>';
$errors=1;
}}
//If no errors registred, print the success message
if(!$errors)
{
echo "<h1>File Uploaded Successfully! Try again!</h1>";
}








i have to upload file in database and show it in the display like profile pic in social networking site.... the image path can be stored successfully but i cant see the image on display ... plz help me...


Locked

Return to “Joomla! 1.5 Coding”