Send Ecards only in one Album? Send Ecards only in one Album?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Send Ecards only in one Album?

Started by impact, May 07, 2006, 12:57:04 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

impact

Hi there,
first ---> Thanks for such a great and simple Gallery ;) Its fantastic

now -->  Sorry for my bad english  ;D

then
I've got a few Kategories and Albums in my Gallery..And the Ecard function is deaktivated, because I dont want that all my pics could be send per ecard.
How could I activate the Ecard Funktion ONLY for one Album?
Is this possible? Or could I only activate it for the whole Gallery ?

I want that Guests, and registered USERS also , only could send Ecards from a special Ecard Kategorie... I didnt know how to do this ...

hope you know what i mean and you could help me..

thx

Joachim Müller

in coppermine's groups page: enable ecards=yes for the particular group that is suppossed to send ecards.
This is an overall switch for the whole gallery. You can't specify a certain album only where sending ecards is allowed. The only workaround is to edit your theme and add an if/then switch to the section that composes the image menu (specifically the ecard button) and output the ecard button link only on specific album pages. This requires some PHP knowledge and hardcoding the album id of the particular album that is suppossed to show the ecard link.
I review the whole idea - sending ecards is a relict from the nineties - who needs additional emails that just show a pic? Power users will copy'n paste the URL of an image into a regular email, that's it.

impact

Quote from: GauGau on May 07, 2006, 08:36:33 AM
sending ecards is a relict from the nineties - who needs additional emails that just show a pic? Power users will copy'n paste the URL of an image into a regular email, that's it.

Yes you re right.. But even i think its easier to send an ecard out of the Gallery..Without open an extra programm like Outlook or something else..
Even I think that some Users respekt the copyrights and do not Copy and paste... lol ;)

Ok .. I have found the right position in the themes.inc.php (i think) .. It must be here??

if (USER_CAN_SEND_ECARDS) {
        $ecard_tgt = "ecard.php?album=$album$cat_link&pid=$pid&pos=$pos";
        $ecard_title = $lang_img_nav_bar['ecard_title'];
    } else {
        template_extract_block($template_img_navbar, 'ecard_button'); // added to remove button if cannot send ecard
        /*$ecard_tgt = "javascript:alert('" . addslashes($lang_img_nav_bar['ecard_disabled_msg']) . "');";
        $ecard_title = $lang_img_nav_bar['ecard_disabled'];*/
    }

                //report to moderator buttons
    if (($CONFIG['report_post']==1) && (USER_CAN_SEND_ECARDS)) {
        $report_tgt = "report_file.php?album=$album$cat_link&pid=$pid&pos=$pos";
    } else { // remove button if report toggle is off
        template_extract_block($template_img_navbar, 'report_file_button');


I dont really know how to do this, but i want it to do :D ..
Can anybody help me?

Something like this? --> if (USER_CAN_SEND_ECARDS && album=12)

Stramm

copy the entire function theme_html_img_nav_menu() from themes/sample/theme.php to the theme.php you're actually using

and your attempt wasn't to bad at all, try
if (USER_CAN_SEND_ECARDS && $album==12)

impact

#4
Cool ... It works :) ...

There are only 3 things to edit

For everyone who would do the same:

open theme.inc.php

In the following, you had to replace the 10 in ($album==10) with the Album Number that you want to use for Ecards
I even test it with $cat instead of $album ... But that doesnt work ...Dont know why


Find
if (USER_CAN_SEND_ECARDS)

Replace with
if ((USER_CAN_SEND_ECARDS) && ($album==10)) 

Find
if (($CONFIG['report_post']==1) && (USER_CAN_SEND_ECARDS))

Replace with
if (($CONFIG['report_post']==1) && (USER_CAN_SEND_ECARDS) && ($album==10))

Find
if (!(($CONFIG['report_post']==1) && (USER_CAN_SEND_ECARDS))

Replace with
if (!(($CONFIG['report_post']==1) && (USER_CAN_SEND_ECARDS) && ($album==10))


If you want to do this for more than one Album, i think this one ---> ($album==10) must be changed in (($album==10) || ($album==11))

for example ..

Stramm

[quote author=impact link=topic=31193.msg144492#msg144492 date=1147002616]
For everyone who would do the same:

open theme.inc.php

as written above, this is not recommended
Quotecopy the entire function theme_html_img_nav_menu() from themes/sample/theme.php to the theme.php you're actually using

the correct 'or' syntax would be
(($album==10) || ($album==11))





Joachim Müller

As Stramm suggested: never edit include/themes.inc.php