Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Banner...Help


katiallo

Recommended Posts

Posted

Trying to add my banner I'm getting this ' Error: Graphs directory is not writeable.' what am I doing wrong?

 

Someone help. Newebie here

Posted
Trying to add my banner I'm getting this ' Error: Graphs directory is not writeable.' what am I doing wrong?

 

Someone help. Newebie here

Through FTp set writ permission to your Graph directory or set to "777" (Read/write/Execute).

Hard Work Is The Simplest Way Of Success

Posted
Through FTp set writ permission to your Graph directory or set to "777" (Read/write/Execute).

 

 

 

I did that but nothing is happening .......anything else I can do?




			
		
Posted
Through FTp set writ permission to your Graph directory or set to "777" (Read/write/Execute).

 

 

 

Sorry all I'm new to this. I set permission to 777. I have to domains. In the one my banners shows up but nex to it there are 2 more boxes that I need to get rid off and don't know how. I'm still getting the error 'Graphs directory is not writeable' Under admin /includes/grahps there is:

 

Banner_daily.php

 

<?php

/*

$Id: banner_daily.php,v 1.2 2002/05/09 14:09:38 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

include(DIR_WS_CLASSES . 'phplot.php');

 

$year = (($HTTP_GET_VARS['year']) ? $HTTP_GET_VARS['year'] : date('Y'));

$month = (($HTTP_GET_VARS['month']) ? $HTTP_GET_VARS['month'] : date('n'));

 

$days = (date('t', mktime(0,0,0,$month))+1);

$stats = array();

for ($i=1; $i<$days; $i++) {

$stats[] = array($i, '0', '0');

}

 

$banner_stats_query = tep_db_query("select dayofmonth(banners_history_date) as banner_day, banners_shown as value, banners_clicked as dvalue from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . $banner_id . "' and month(banners_history_date) = '" . $month . "' and year(banners_history_date) = '" . $year . "'");

while ($banner_stats = tep_db_fetch_array($banner_stats_query)) {

$stats[($banner_stats['banner_day']-1)] = array($banner_stats['banner_day'], (($banner_stats['value']) ? $banner_stats['value'] : '0'), (($banner_stats['dvalue']) ? $banner_stats['dvalue'] : '0'));

}

 

$graph = new PHPlot(600, 350, 'images/graphs/banner_daily-' . $banner_id . '.' . $banner_extension);

 

$graph->SetFileFormat($banner_extension);

$graph->SetIsInline(1);

$graph->SetPrintImage(0);

 

$graph->SetSkipBottomTick(1);

$graph->SetDrawYGrid(1);

$graph->SetPrecisionY(0);

$graph->SetPlotType('lines');

 

$graph->SetPlotBorderType('left');

$graph->SetTitleFontSize('4');

$graph->SetTitle(sprintf(TEXT_BANNERS_DAILY_STATISTICS, $banner['banners_title'], strftime('%B', mktime(0,0,0,$month)), $year));

 

$graph->SetBackgroundColor('white');

 

$graph->SetVertTickPosition('plotleft');

$graph->SetDataValues($stats);

$graph->SetDataColors(array('blue','red'),array('blue', 'red'));

 

$graph->DrawGraph();

 

$graph->PrintImage();

?>

 

 

 

 

banner_infobox.php

 

 

<?php

/*

$Id: banner_infobox.php,v 1.3 2003/07/11 18:15:42 project3000 Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

include(DIR_WS_CLASSES . 'phplot.php');

 

$stats = array();

$banner_stats_query = tep_db_query("select dayofmonth(banners_history_date) as name, banners_shown as value, banners_clicked as dvalue from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . $banner_id . "' and to_days(now()) - to_days(banners_history_date) < " . $days . " order by banners_history_date");

while ($banner_stats = tep_db_fetch_array($banner_stats_query)) {

$stats[] = array($banner_stats['name'], $banner_stats['value'], $banner_stats['dvalue']);

}

 

if (sizeof($stats) < 1) $stats = array(array(date('j'), 0, 0));

 

$graph = new PHPlot(200, 220, 'images/graphs/banner_infobox-' . $banner_id . '.' . $banner_extension);

 

$graph->SetFileFormat($banner_extension);

$graph->SetIsInline(1);

$graph->SetPrintImage(0);

 

$graph->draw_vert_ticks = 0;

$graph->SetSkipBottomTick(1);

$graph->SetDrawXDataLabels(0);

$graph->SetDrawYGrid(0);

$graph->SetPlotType('bars');

$graph->SetDrawDataLabels(1);

$graph->SetLabelScalePosition(1);

$graph->SetMarginsPixels(15,15,15,30);

 

$graph->SetTitleFontSize('4');

$graph->SetTitle('TEXT_BANNERS_LAST_3_DAYS');

 

$graph->SetDataValues($stats);

$graph->SetDataColors(array('blue','red'),array('blue', 'red'));

 

$graph->DrawGraph();

 

$graph->PrintImage();

?>

 

 

 

 

banner_monthly.php

 

 

<?php

/*

$Id: banner_monthly.php,v 1.3 2002/05/09 18:28:46 dgw_ Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

include(DIR_WS_CLASSES . 'phplot.php');

 

$year = (($HTTP_GET_VARS['year']) ? $HTTP_GET_VARS['year'] : date('Y'));

 

$stats = array();

for ($i=1; $i<13; $i++) {

$stats[] = array(strftime('%b', mktime(0,0,0,$i)), '0', '0');

}

 

$banner_stats_query = tep_db_query("select month(banners_history_date) as banner_month, sum(banners_shown) as value, sum(banners_clicked) as dvalue from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . $banner_id . "' and year(banners_history_date) = '" . $year . "' group by banner_month");

while ($banner_stats = tep_db_fetch_array($banner_stats_query)) {

$stats[($banner_stats['banner_month']-1)] = array(strftime('%b', mktime(0,0,0,$banner_stats['banner_month'])), (($banner_stats['value']) ? $banner_stats['value'] : '0'), (($banner_stats['dvalue']) ? $banner_stats['dvalue'] : '0'));

}

 

$graph = new PHPlot(600, 350, 'images/graphs/banner_monthly-' . $banner_id . '.' . $banner_extension);

 

$graph->SetFileFormat($banner_extension);

$graph->SetIsInline(1);

$graph->SetPrintImage(0);

 

$graph->SetSkipBottomTick(1);

$graph->SetDrawYGrid(1);

$graph->SetPrecisionY(0);

$graph->SetPlotType('lines');

 

$graph->SetPlotBorderType('left');

$graph->SetTitleFontSize('4');

$graph->SetTitle(sprintf(TEXT_BANNERS_MONTHLY_STATISTICS, $banner['banners_title'], $year));

 

$graph->SetBackgroundColor('white');

 

$graph->SetVertTickPosition('plotleft');

$graph->SetDataValues($stats);

$graph->SetDataColors(array('blue','red'),array('blue', 'red'));

 

$graph->DrawGraph();

 

$graph->PrintImage();

?>

 

 

 

banner_yearly.php

 

 

<?php

/*

$Id: banner_yearly.php,v 1.3 2002/05/09 18:28:46 dgw_ Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

include(DIR_WS_CLASSES . 'phplot.php');

 

$stats = array(array('0', '0', '0'));

$banner_stats_query = tep_db_query("select year(banners_history_date) as year, sum(banners_shown) as value, sum(banners_clicked) as dvalue from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . $banner_id . "' group by year");

while ($banner_stats = tep_db_fetch_array($banner_stats_query)) {

$stats[] = array($banner_stats['year'], (($banner_stats['value']) ? $banner_stats['value'] : '0'), (($banner_stats['dvalue']) ? $banner_stats['dvalue'] : '0'));

}

 

$graph = new PHPlot(600, 350, 'images/graphs/banner_yearly-' . $banner_id . '.' . $banner_extension);

 

$graph->SetFileFormat($banner_extension);

$graph->SetIsInline(1);

$graph->SetPrintImage(0);

 

$graph->SetSkipBottomTick(1);

$graph->SetDrawYGrid(1);

$graph->SetPrecisionY(0);

$graph->SetPlotType('lines');

 

$graph->SetPlotBorderType('left');

$graph->SetTitleFontSize('4');

$graph->SetTitle(sprintf(TEXT_BANNERS_YEARLY_STATISTICS, $banner['banners_title']));

 

$graph->SetBackgroundColor('white');

 

$graph->SetVertTickPosition('plotleft');

$graph->SetDataValues($stats);

$graph->SetDataColors(array('blue','red'),array('blue', 'red'));

 

$graph->DrawGraph();

 

$graph->PrintImage();

?>

 

 

 

IS THERE ANY CHANGES I HAVE TO MAKE HERE OR I'M LOOKING AT THE WRONG PLACE.

MY BANNER IS SHOWING ON THE PAGE WITH 2 BOXES NEXT TO IT. I WANT TO GET RID OF THE ONE ON THE RIGHT. STILL GETTING THE ERROR 'Graphs directory is not writeable' .

 

 

 

On the other domail can't add my banner. getting the error 'Graphs directory is not writeable'. Changed permission to 777.

 

 

banner_daily.php

 

 

<?php

/*

$Id: banner_daily.php,v 1.2 2002/05/09 14:09:38 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

include(DIR_WS_CLASSES . 'phplot.php');

 

$year = (($HTTP_GET_VARS['year']) ? $HTTP_GET_VARS['year'] : date('Y'));

$month = (($HTTP_GET_VARS['month']) ? $HTTP_GET_VARS['month'] : date('n'));

 

$days = (date('t', mktime(0,0,0,$month))+1);

$stats = array();

for ($i=1; $i<$days; $i++) {

$stats[] = array($i, '0', '0');

}

 

$banner_stats_query = tep_db_query("select dayofmonth(banners_history_date) as banner_day, banners_shown as value, banners_clicked as dvalue from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . $banner_id . "' and month(banners_history_date) = '" . $month . "' and year(banners_history_date) = '" . $year . "'");

while ($banner_stats = tep_db_fetch_array($banner_stats_query)) {

$stats[($banner_stats['banner_day']-1)] = array($banner_stats['banner_day'], (($banner_stats['value']) ? $banner_stats['value'] : '0'), (($banner_stats['dvalue']) ? $banner_stats['dvalue'] : '0'));

}

 

$graph = new PHPlot(600, 350, 'images/graphs/banner_daily-' . $banner_id . '.' . $banner_extension);

 

$graph->SetFileFormat($banner_extension);

$graph->SetIsInline(1);

$graph->SetPrintImage(0);

 

$graph->SetSkipBottomTick(1);

$graph->SetDrawYGrid(1);

$graph->SetPrecisionY(0);

$graph->SetPlotType('lines');

 

$graph->SetPlotBorderType('left');

$graph->SetTitleFontSize('4');

$graph->SetTitle(sprintf(TEXT_BANNERS_DAILY_STATISTICS, $banner['banners_title'], strftime('%B', mktime(0,0,0,$month)), $year));

 

$graph->SetBackgroundColor('white');

 

$graph->SetVertTickPosition('plotleft');

$graph->SetDataValues($stats);

$graph->SetDataColors(array('blue','red'),array('blue', 'red'));

 

$graph->DrawGraph();

 

$graph->PrintImage();

?>

 

 

 

banner_infobox.php

 

 

<?php

/*

$Id: banner_infobox.php,v 1.3 2003/07/11 18:15:42 project3000 Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

include(DIR_WS_CLASSES . 'phplot.php');

 

$stats = array();

$banner_stats_query = tep_db_query("select dayofmonth(banners_history_date) as name, banners_shown as value, banners_clicked as dvalue from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . $banner_id . "' and to_days(now()) - to_days(banners_history_date) < " . $days . " order by banners_history_date");

while ($banner_stats = tep_db_fetch_array($banner_stats_query)) {

$stats[] = array($banner_stats['name'], $banner_stats['value'], $banner_stats['dvalue']);

}

 

if (sizeof($stats) < 1) $stats = array(array(date('j'), 0, 0));

 

$graph = new PHPlot(200, 220, 'images/graphs/banner_infobox-' . $banner_id . '.' . $banner_extension);

 

$graph->SetFileFormat($banner_extension);

$graph->SetIsInline(1);

$graph->SetPrintImage(0);

 

$graph->draw_vert_ticks = 0;

$graph->SetSkipBottomTick(1);

$graph->SetDrawXDataLabels(0);

$graph->SetDrawYGrid(0);

$graph->SetPlotType('bars');

$graph->SetDrawDataLabels(1);

$graph->SetLabelScalePosition(1);

$graph->SetMarginsPixels(15,15,15,30);

 

$graph->SetTitleFontSize('4');

$graph->SetTitle('TEXT_BANNERS_LAST_3_DAYS');

 

$graph->SetDataValues($stats);

$graph->SetDataColors(array('blue','red'),array('blue', 'red'));

 

$graph->DrawGraph();

 

$graph->PrintImage();

?>

 

 

 

banner_montly.php

 

 

<?php

/*

$Id: banner_monthly.php,v 1.3 2002/05/09 18:28:46 dgw_ Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

include(DIR_WS_CLASSES . 'phplot.php');

 

$year = (($HTTP_GET_VARS['year']) ? $HTTP_GET_VARS['year'] : date('Y'));

 

$stats = array();

for ($i=1; $i<13; $i++) {

$stats[] = array(strftime('%b', mktime(0,0,0,$i)), '0', '0');

}

 

$banner_stats_query = tep_db_query("select month(banners_history_date) as banner_month, sum(banners_shown) as value, sum(banners_clicked) as dvalue from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . $banner_id . "' and year(banners_history_date) = '" . $year . "' group by banner_month");

while ($banner_stats = tep_db_fetch_array($banner_stats_query)) {

$stats[($banner_stats['banner_month']-1)] = array(strftime('%b', mktime(0,0,0,$banner_stats['banner_month'])), (($banner_stats['value']) ? $banner_stats['value'] : '0'), (($banner_stats['dvalue']) ? $banner_stats['dvalue'] : '0'));

}

 

$graph = new PHPlot(600, 350, 'images/graphs/banner_monthly-' . $banner_id . '.' . $banner_extension);

 

$graph->SetFileFormat($banner_extension);

$graph->SetIsInline(1);

$graph->SetPrintImage(0);

 

$graph->SetSkipBottomTick(1);

$graph->SetDrawYGrid(1);

$graph->SetPrecisionY(0);

$graph->SetPlotType('lines');

 

$graph->SetPlotBorderType('left');

$graph->SetTitleFontSize('4');

$graph->SetTitle(sprintf(TEXT_BANNERS_MONTHLY_STATISTICS, $banner['banners_title'], $year));

 

$graph->SetBackgroundColor('white');

 

$graph->SetVertTickPosition('plotleft');

$graph->SetDataValues($stats);

$graph->SetDataColors(array('blue','red'),array('blue', 'red'));

 

$graph->DrawGraph();

 

$graph->PrintImage();

?>

 

 

 

banner_yearly.php

 

 

<?php

/*

$Id: banner_yearly.php,v 1.3 2002/05/09 18:28:46 dgw_ Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

include(DIR_WS_CLASSES . 'phplot.php');

 

$stats = array(array('0', '0', '0'));

$banner_stats_query = tep_db_query("select year(banners_history_date) as year, sum(banners_shown) as value, sum(banners_clicked) as dvalue from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . $banner_id . "' group by year");

while ($banner_stats = tep_db_fetch_array($banner_stats_query)) {

$stats[] = array($banner_stats['year'], (($banner_stats['value']) ? $banner_stats['value'] : '0'), (($banner_stats['dvalue']) ? $banner_stats['dvalue'] : '0'));

}

 

$graph = new PHPlot(600, 350, 'images/graphs/banner_yearly-' . $banner_id . '.' . $banner_extension);

 

$graph->SetFileFormat($banner_extension);

$graph->SetIsInline(1);

$graph->SetPrintImage(0);

 

$graph->SetSkipBottomTick(1);

$graph->SetDrawYGrid(1);

$graph->SetPrecisionY(0);

$graph->SetPlotType('lines');

 

$graph->SetPlotBorderType('left');

$graph->SetTitleFontSize('4');

$graph->SetTitle(sprintf(TEXT_BANNERS_YEARLY_STATISTICS, $banner['banners_title']));

 

$graph->SetBackgroundColor('white');

 

$graph->SetVertTickPosition('plotleft');

$graph->SetDataValues($stats);

$graph->SetDataColors(array('blue','red'),array('blue', 'red'));

 

$graph->DrawGraph();

 

$graph->PrintImage();

?>

 

 

 

 

I HAVE NO IDEA IF I'M LOOKING AT THE RIGHT PLACE. SOMEONE PLEASE HELP TO GET THIS GOING AT PLEASE REMEMBER THAT I'M NEW TO THIS AND I NEED MORE DETAILED HELP.

 

 

THANK YOU ALL




			
		

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...