1
rasme
For who need myalbum send e-card
  • 2007/5/12 14:10

  • rasme

  • Just popping in

  • Posts: 39

  • Since: 2005/5/9 6


I take this from rmgallery

Open xoops_version.php
On line 392 add
$modversion['config'][] = array(
        
'name'                        => 'bodymsg' ,
        
'title'                        => '_ALBM_CFG_BODYMSG' ,
        
'description'        => 'Text for E-mails' ,
        
'formtype'                => 'textarea' ,
        
'valuetype'                => 'text' ,
        
'default'                => "Hello %user:


%sender has sent to you E-Card from %sitename.


 In order to see it click in the following link:

 %link.


 This card will be active during %days days, later will be deleted automatically.


Greetings, 
%sitename
,
        
'options'                => array()
) ;
$modversion['config'][] = array(
        
'name'                        => 'mycarddays' ,
        
'title'                        => '_ALBM_CFG_MYCARDDAYS' ,
        
'description'        => 'Days before deleting E-Cards' ,
        
'formtype'                => 'textbox' ,
        
'valuetype'                => 'int' ,
        
'default'                => '15' ,
        
'options'                => array()
) ;
$modversion['config'][] = array(
        
'name'                        => 'anonymousend' ,
        
'title'                        => '_ALBM_CFG_ANONYMOUSEND' ,
        
'description'        => 'Anonymous users can send E-Cards' ,
        
'formtype'                => 'yesno' ,
        
'valuetype'                => 'int' ,
        
'default'                => '0' ,
        
'options'                => array()
) ;


Find
$modversion['templates'][11]['description'] = '';

Under add
$modversion['templates'][12]['file'] = "{$mydirname}_postcard.html" ;
$modversion['templates'][12]['description'] = '';
$modversion['templates'][13]['file'] = "{$mydirname}_preview.html" ;
$modversion['templates'][13]['description'] = '';


Save & exit

Add by phpmyadmin

CREATE TABLE `xoops_myalbum_postal` (
`id` varchar(150) NOT NULL default '',
`time` varchar(30) NOT NULL default '',
`photo` int(11) NOT NULL default '0',
`short_message` varchar(150) NOT NULL default '',
`message` text NOT NULL,
`bgcolor` varchar(7) NOT NULL default '',
`textcolor` varchar(7) NOT NULL default '',
`font` varchar(50) NOT NULL default '',
`bordercolor` varchar(7) NOT NULL default '',
`sname` varchar(150) NOT NULL default '',
`semail` varchar(200) NOT NULL default '',
`toname` varchar(150) NOT NULL default '',
`toemail` varchar(200) NOT NULL default '',
`userid` varchar(25) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM;

Change link Tell a friend in Tow templates

myalbum_photo.html and myalbum_photo_in_list.html

Find :

<a href='<{$xoops_url}>/modules/tellafriend/index.php?target_uri=<{$mod_url|escape:"url"}>/photo.php%3Flid%3D<{$photo.lid}>&subject=<{$lang_subject4taf|escape:"url"}>'><img src='<{$mod_url}>/images/tellafriend.gif' width='24' height='16' alt='<{$lang_tellafriend}>' title='<{$lang_tellafriend}>' /><{$lang_tellafriend}>a>


Replce :

<a href='<{$mod_url}>/postal.php?lid=<{$photo.lid}>'><img src='<{$mod_url}>/images/tellafriend.gif' width='24' height='16' alt='<{$lang_tellafriend}>' title='<{$lang_tellafriend}>' /><{$lang_tellafriend}>a>


download
Postal.php
preview.php
myalbum_postcard.html
myalbum_preview.html

Go to admin page and update module

2
rasme
Re: For who need myalbum send e-card
  • 2007/5/12 14:14

  • rasme

  • Just popping in

  • Posts: 39

  • Since: 2005/5/9 6


Add to language

modinfo.php Line 119
define("_ALBM_CFG_BODYMSG", "Text for E-mails");
define("_ALBM_CFG_MYCARDDAYS", "Days before deleting E-Cards");
define("_ALBM_CFG_ANONYMOUSEND", "Anonymous users can send E-Cards");

main.php Line 225
//ecard
define("_ALBM_SENDER", "Sender");
define("_ALBM_RECIPIENT", "Recipient");
define("_ALBM_BGCOLOR", "Background color:");
define("_ALBM_SEND_POSTCARD", "Send E-Card");
define("_ALBM_BORDER_COLOR", "Border color:");
define("_ALBM_FONT_TYPE", "Font type:");
define("_ALBM_FONT_COLOR", "Font color:");
define("_ALBM_NAME", "Name:");
define("_ALBM_EMAIL", "E-mail:");
define("_ALBM_SHORT_DESC", "Short Description:");
define("_ALBM_TEXT_MSG", "Message:");
define("_ALBM_PREVIEW_POSTCARD", "Card preview");
define("_ALBM_MODIFY_POSTCARD", "Modify Card");
define("_ALBM_SEND_POSTCARDNOW", "Send card now");
define("_ALBM_SEND_SUCESS", "Card sent successfully");
define("_ALBM_POSTAL_RECEIVED", "Card Received!");
define("_ALBM_ERROR_SENDPOSTCARD", "Error happened on sending E-Card");
define("_ALBM_ERROR_SENDERNAME", "You have not specified the name of the sender");
define("_ALBM_ERROR_SENDERMAIL", "You have not specified the e-mail of the sender");
define("_ALBM_ERROR_INVALIDMAILS", "The e-mail of the sender is not valid");
define("_ALBM_ERROR_TONAME", "You have not specified the name of the recipient");
define("_ALBM_ERROR_TOMAIL", "You have not specified the e-mail of the recipient");
define("_ALBM_ERROR_INVALIDMAILR", "The e-mail of the recipient is not valid");
define("_ALBM_ERROR_NODESC", "Write a short description for the E-Card");
define("_ALBM_ERROR_NOMSG", "Write a message for the postcard");

3
n01un0
Re: For who need myalbum send e-card
  • 2007/5/12 18:32

  • n01un0

  • Quite a regular

  • Posts: 253

  • Since: 2005/10/9


Quote:

rasme wrote:

download
Postal.php
preview.php
myalbum_postcard.html
myalbum_preview.html

Go to admin page and update module




What folder in myalbum do I upload these to?

Thanks

4
rasme
Re: For who need myalbum send e-card
  • 2007/5/12 20:37

  • rasme

  • Just popping in

  • Posts: 39

  • Since: 2005/5/9 6


sorry n01un0

Postal.php
preview.php
upload these in myalbum dir

and

myalbum_postcard.html
myalbum_preview.html
upload these in myalbum/templates

also I update zip file.

5
Anonymous
Re: For who need myalbum send e-card
  • 2007/5/12 21:25

  • Anonymous

  • Posts: 0

  • Since:


Great work rasme

6
n01un0
Re: For who need myalbum send e-card
  • 2007/5/12 22:07

  • n01un0

  • Quite a regular

  • Posts: 253

  • Since: 2005/10/9


AWSOME JOB RASME!!!!!

The hack worked like a charm!!

Thanks for sharing!

I still seem to have "tell a friend" as the link for the ecard. How do I change it to "send as eCard" or something like that?

7
n01un0
Re: For who need myalbum send e-card
  • 2007/5/12 22:10

  • n01un0

  • Quite a regular

  • Posts: 253

  • Since: 2005/10/9


Scratch that last question. I edited the main.php from

define("_ALBM_TELLAFRIEND","Tell a friend");

to

define("_ALBM_TELLAFRIEND","Send Photo as eCard");


Thanks again!!

8
rasme
Re: For who need myalbum send e-card
  • 2007/5/12 22:56

  • rasme

  • Just popping in

  • Posts: 39

  • Since: 2005/5/9 6


mashkoor Mowaffak

9
rasme
Re: For who need myalbum send e-card
  • 2007/5/12 23:05

  • rasme

  • Just popping in

  • Posts: 39

  • Since: 2005/5/9 6


Thanks n01un0

10
xavhmn
Re: For who need myalbum send e-card
  • 2007/5/21 16:41

  • xavhmn

  • Just popping in

  • Posts: 23

  • Since: 2004/11/16


i have 3 errors

Notice: Undefined variable: preview in file /modules/myalbum/postal.php line 129

Notice: Undefined variable: description in file /modules/myalbum/include/draw_functions.php line 117

Notice: Undefined variable: file in file /modules/myalbum/postal.php line 200

Login

Who's Online

443 user(s) are online (322 user(s) are browsing Support Forums)


Members: 0


Guests: 443


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits