Information sur les auteurs & la licence
Retour à la page principale des auteursAide pour cards version 1.5
// ----------------------------------------------------------------------
// CARDS module
// Purpose: Create via web a Virtual Greeting Card
// Copyright (C) 2003 by Olivier Guillet
// Written by Olivier Guillet
// Get the newest version at http://www.keopsonline.com
// ----------------------------------------------------------------------
// Based on:
// MyPHPCard - http://belchiorfoundry.com/
// ----------------------------------------------------------------------
// POSTNUKE Content Management System
// Copyright (C) 2002 by the PostNuke Development Team.
// http://www.postnuke.com
// ----------------------------------------------------------------------
======================================
COPYRIGHT MODULE
======================================
As many of Us thinks about finding a better way to show Copyright rather than
clutter up the pages of their module with that information.
So in order to use this module you have to implement this new way of showing Copyright information.
Obviously, If nobody like this way (from PHPNuke) i will implement directly to the module.
add this line "copyright();" in the first line of the themefooter function in your theme.php:
function themefooter() {
global $index, $currentlang;
copyright();
...
add also the fuction at the end of your theme.php
/******************************************************************************/
/* Copyright */
/* */
/* Here we'll format the Copyright Information of the Module Used */
/******************************************************************************/
function copyright()
{
global $ModName;
if(file_exists("modules/$ModName/copyright.php")) {
echo "<div align=\"right\"><a class=\"pn-normal\" href=\"javascript:void(0)\" onClick=\"MyWindow = window.open('modules.php?op=modload&name=$ModName&file=copyright','copyright','width=400,height=200,left=50%,top=50%,status=no,directories=no,toolbar=no,location=no,menubar=no,scrollbars=yes,resizable=no');\">$ModName ©</a></div>";
}
}
======================================
UPGRADING THE MODULE
======================================
1. Make a copy of your config.inc file.
2. Delete all the cards files.
3. follow Installing Module instructions.
======================================
INSTALLING THE MODULE
======================================
1. Unpack the "cards" directory in your html/modules directory.
Do the same thing with the "gallery" directory if you want to use your Gallery module as source of media.
Browse your Postnuke site and click on Adminstration->Modules.
Then click on "regenerate" to add the cards modules to your site.
Click on "Initialise" for the cards module.
Click on "Activate" for the cards module.
2. Go to the configuration section to configure your module functions and path.
3. Then, click on "Install" to install the Default cards package.
"More packages will be added soon".
4. Now, you can use the Gallery module of Bharat Mediratta or any other photo gallery module as a source of pictures for your ecards module.
In the module gallery in the folder html_wrap find the file inline_photo.header
(You can copy the file html_wrap/inline_photo.header.default to html_wrap/inline_photo.header and edit it, if you have not used this file before)
Modify and insert the following code to view a link for sending pic as ecard on top of every pic in your gallery:
<?php
$photo = $gallery->album->getPhoto($GLOBALS['index']);
if ($photo->isResized()) {
$name = $photo->image->resizedName;
} else {
$name = $photo->image->name;
}
$url = $gallery->album->getAlbumDirURL("full") .
"/" .
$name . "." . $photo->image->type;
?>
<br><center><a
href="modules.php?op=modload&name=cards&file=create&imgfile=<?php echo
urlencode($url); ?>"><font="verdana" size="3"><b>send this photo (below) as an
ecard</b></a></font><br><br></center>
<--- We also provide the file inline_photo.header if you do not want to modified yourself. ---->
5. In order to send cards which are not sent immediatly (delayed) you need to execute the file advancedate.php manually or
you can use a cron job feature to do it automatically.
How do I set up a cron job?
Via the "crontab" command from the shell.
crontab -l will show you your currently set up cron jobs on the server.
crontab -r will delete your current cron jobs.
crontab -e will allow you to add or edit your current cron jobs by using your default text editor to edit your "crontab file".
Your crontab includes all the cron jobs you'd like, with one cron entry per line. A cron entry looks like this:
45 2 * * * /home/user/html/modules.php?op=modload&name=cards&file=advancedate
The first number is the minute of the hour for the command to run on.
The second number is the hour of the day for the command to run on.
The third number is the day of the month for the command to run on.
The fourth number is the month of the year for the command to run on.
The fifth number is the day of the week for the command to run on.
Here are some examples to help you learn the syntax for the numbers:
32 * * * * : will be run every hour on the 32nd minute.
12,42 * * * * : will be run twice an hour on the 12th and 42nd minutes.
*/15 */2 * * *: will be run at 0:00, 0:15, 0:30, 0:45, 2:00, 2:15, 2:30, ...
43 18 * * 7: will be run at 6:43pm every Sunday.
For more info about how to set a cron job, please ask your hosting service.
6. That's all!
// CARDS module
// Purpose: Create via web a Virtual Greeting Card
// Copyright (C) 2003 by Olivier Guillet
// Written by Olivier Guillet
// Get the newest version at http://www.keopsonline.com
// ----------------------------------------------------------------------
// Based on:
// MyPHPCard - http://belchiorfoundry.com/
// ----------------------------------------------------------------------
// POSTNUKE Content Management System
// Copyright (C) 2002 by the PostNuke Development Team.
// http://www.postnuke.com
// ----------------------------------------------------------------------
======================================
COPYRIGHT MODULE
======================================
As many of Us thinks about finding a better way to show Copyright rather than
clutter up the pages of their module with that information.
So in order to use this module you have to implement this new way of showing Copyright information.
Obviously, If nobody like this way (from PHPNuke) i will implement directly to the module.
add this line "copyright();" in the first line of the themefooter function in your theme.php:
function themefooter() {
global $index, $currentlang;
copyright();
...
add also the fuction at the end of your theme.php
/******************************************************************************/
/* Copyright */
/* */
/* Here we'll format the Copyright Information of the Module Used */
/******************************************************************************/
function copyright()
{
global $ModName;
if(file_exists("modules/$ModName/copyright.php")) {
echo "<div align=\"right\"><a class=\"pn-normal\" href=\"javascript:void(0)\" onClick=\"MyWindow = window.open('modules.php?op=modload&name=$ModName&file=copyright','copyright','width=400,height=200,left=50%,top=50%,status=no,directories=no,toolbar=no,location=no,menubar=no,scrollbars=yes,resizable=no');\">$ModName ©</a></div>";
}
}
======================================
UPGRADING THE MODULE
======================================
1. Make a copy of your config.inc file.
2. Delete all the cards files.
3. follow Installing Module instructions.
======================================
INSTALLING THE MODULE
======================================
1. Unpack the "cards" directory in your html/modules directory.
Do the same thing with the "gallery" directory if you want to use your Gallery module as source of media.
Browse your Postnuke site and click on Adminstration->Modules.
Then click on "regenerate" to add the cards modules to your site.
Click on "Initialise" for the cards module.
Click on "Activate" for the cards module.
2. Go to the configuration section to configure your module functions and path.
3. Then, click on "Install" to install the Default cards package.
"More packages will be added soon".
4. Now, you can use the Gallery module of Bharat Mediratta or any other photo gallery module as a source of pictures for your ecards module.
In the module gallery in the folder html_wrap find the file inline_photo.header
(You can copy the file html_wrap/inline_photo.header.default to html_wrap/inline_photo.header and edit it, if you have not used this file before)
Modify and insert the following code to view a link for sending pic as ecard on top of every pic in your gallery:
<?php
$photo = $gallery->album->getPhoto($GLOBALS['index']);
if ($photo->isResized()) {
$name = $photo->image->resizedName;
} else {
$name = $photo->image->name;
}
$url = $gallery->album->getAlbumDirURL("full") .
"/" .
$name . "." . $photo->image->type;
?>
<br><center><a
href="modules.php?op=modload&name=cards&file=create&imgfile=<?php echo
urlencode($url); ?>"><font="verdana" size="3"><b>send this photo (below) as an
ecard</b></a></font><br><br></center>
<--- We also provide the file inline_photo.header if you do not want to modified yourself. ---->
5. In order to send cards which are not sent immediatly (delayed) you need to execute the file advancedate.php manually or
you can use a cron job feature to do it automatically.
How do I set up a cron job?
Via the "crontab" command from the shell.
crontab -l will show you your currently set up cron jobs on the server.
crontab -r will delete your current cron jobs.
crontab -e will allow you to add or edit your current cron jobs by using your default text editor to edit your "crontab file".
Your crontab includes all the cron jobs you'd like, with one cron entry per line. A cron entry looks like this:
45 2 * * * /home/user/html/modules.php?op=modload&name=cards&file=advancedate
The first number is the minute of the hour for the command to run on.
The second number is the hour of the day for the command to run on.
The third number is the day of the month for the command to run on.
The fourth number is the month of the year for the command to run on.
The fifth number is the day of the week for the command to run on.
Here are some examples to help you learn the syntax for the numbers:
32 * * * * : will be run every hour on the 32nd minute.
12,42 * * * * : will be run twice an hour on the 12th and 42nd minutes.
*/15 */2 * * *: will be run at 0:00, 0:15, 0:30, 0:45, 2:00, 2:15, 2:30, ...
43 18 * * 7: will be run at 6:43pm every Sunday.
For more info about how to set a cron job, please ask your hosting service.
6. That's all!








