PDA

View Full Version : Problem with Banner plugin -Wrong date



Peter Jonsson
July 16, 2012, 02:13 PM
So i just installed the banner plugin and i have set it up and added some banners.

The problem are that the banners are dated 1970-01-01 so there is something wrong with the plugin as the rest of the site shows the right date and year :D

Vladimir
July 17, 2012, 05:32 AM
Hello,

you can fix the problem in the following way:

- open file plugins/banners/admin/banners.inc.php
- find this code (~283 - ~300):


$update = array(
'fields' => array(
.........
'Status' => $postData['status']
),
'where' => array('ID' => $bannerId)
);


and change to it:



$update = array(
'fields' => array(
.........
'Status' => $postData['status'],
'Date_release' => $now
),
'where' => array('ID' => $bannerId)
);

Peter Jonsson
July 17, 2012, 08:44 AM
Thanks!

Even more problem with the banners plugin.

I made 2 boxes. One on the left sidebar and one on the right sidebar.

Now i go make 1 banner to put on the right banner. That works.
Now i make a banner to put on the left sidebar. That banner end up at the right sidebar.

So all my banners end up in the right sidebar.

Vladimir
July 17, 2012, 09:13 AM
I've diagnosed the banners on our site and haven't found same problem. Would you please submit a ticket to our technical support and we will check the problem.

Peter Jonsson
July 17, 2012, 11:09 AM
Got it to work, i reinstalled the plugin.

Now i only have only last thing to do then the feature is active also.

How can i change the name on the boxes so all boxes have the same name on the front but when they shoose the location it says the real name.
It's kinda ugly to have it like this "Start - leftside box" "Start - rightside box" on the front page. I want the boxes to say "Annons

Vladimir
July 18, 2012, 03:53 AM
You can change the name of block to static but it will be hard-coding.

1. Add a lang key (for example: block_banner_name)
2. Open file plugins/banners/admin/banner_boxes.inc.php
3. find this code:



// check name
$f_name = $_POST['name'];
foreach( $allLangs as $lkey => $lval )
{
if ( empty( $f_name[$allLangs[$lkey]['Code']] ) )
{
array_push( $errors, str_replace('{field}', "<b>{$lang['name']}({$allLangs[$lkey]['name']})</b>", $lang['notice_field_empty']) );
array_push( $error_fields, "name[{$lval['Code']}]" );
}
$f_names[$allLangs[$lkey]['Code']] = $f_name[$allLangs[$lkey]['Code']];
}


and change it to



// check name
$f_name = array();
foreach( $allLangs as $lkey => $lval )
{
$f_names[$allLangs[$lkey]['Code']] = $GLOBALS['lang']['block_banner_name'];
}

Peter Jonsson
July 18, 2012, 09:49 AM
Tried it and nothing happened.

Made a lang key:

Key - se | block_banner_name Value - Annons System module - common

Then i copy paste the php code above and over the old php code.

But nothing, it says the same names as before.

Vladimir
July 18, 2012, 11:15 AM
Do you edit these banner boxes after changes?

Peter Jonsson
July 18, 2012, 01:58 PM
You mean change the names or something ? No i havent.

Ok, i changed the name of the box and the name are blank!
No i cant see what the name of the box are and when they are choosing what box they want their banner in they can see the name of that box either.

All i want is to change the name on the frontpage not on the admin panel.

Peter Jonsson
July 19, 2012, 03:30 PM
You have any fix for this ?

Peter Jonsson
July 20, 2012, 02:41 PM
The plugin dont work with the tab Transactions ? I dont see under Transactions page that anyone have bought a banner space.

Vladimir
July 23, 2012, 04:55 AM
Would you please submit a ticket to our technical support and we will check and fix it ASAP. (If this error related not only to your site that we will provide the solution of problem on this forum.)

Peter Jonsson
September 18, 2012, 10:55 AM
Hello,

you can fix the problem in the following way:

- open file plugins/banners/admin/banners.inc.php
- find this code (~283 - ~300):


$update = array(
'fields' => array(
.........
'Status' => $postData['status']
),
'where' => array('ID' => $bannerId)
);


and change to it:



$update = array(
'fields' => array(
.........
'Status' => $postData['status'],
'Date_release' => $now
),
'where' => array('ID' => $bannerId)
);


Isnt working, still shows 1970-01-01

156