forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: allvip on August 25, 2013, 03:21:30 am

Title: Last visited images
Post by: allvip on August 25, 2013, 03:21:30 am
I want a plugin that show the last visited images to see want users look at every day.
is there a plugin thet dies that?
thanks.

Title: Re: Last visited images
Post by: Αndré on August 26, 2013, 10:44:20 am
That's a core feature of Coppermine: http://coppermine-gallery.net/demo/cpg15x/thumbnails.php?album=lasthits
Title: Re: Last visited images
Post by: allvip on August 27, 2013, 12:44:57 pm
thanks
I have to at http://allvip.us/gallery/thumbnails.php?album=lasthits (http://allvip.us/gallery/thumbnails.php?album=lasthits).
I can add it to home page minicms/breadcrumb/alblist/lasthits,2/lastup,2/random,40/onlinestats

BUT not in the menu.if is a core function,why is not in the menu?
how to I add it in the menu?

THIS DID NOT WORKED - add to temep.php:
Code: [Select]
addbutton($sub_menu_buttons,'{LASTHITS_LNK}','{LASTHITS_TITLE}','{LASTHITS_TGT}','lasthits',$template_sub_menu_spacer,'rel="nofollow"');
or

Code: [Select]
/******************************************************************************
** Section <<<THEME_HAS_NO_SUB_MENU_BUTTONS>>> - START
******************************************************************************/
if (!defined('THEME_HAS_NO_SUB_MENU_BUTTONS')) {

    // HTML template for template sub_menu spacer

    $template_sub_menu_spacer = $template_sys_menu_spacer;

    // HTML template for template sub_menu buttons

    $template_sub_menu_button = $template_sys_menu_button;

    // HTML template for template sub_menu buttons

    // {HREF_LNK}{HREF_TITLE}{HREF_TGT}{BLOCK_ID}{SPACER}{HREF_ATTRIBUTES}
    addbutton($sub_menu_buttons,'{CUSTOM_LNK_LNK}','{CUSTOM_LNK_TITLE}','{CUSTOM_LNK_TGT}','custom_link',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{ALB_LIST_LNK}','{ALB_LIST_TITLE}','{ALB_LIST_TGT}','album_list',$template_sub_menu_spacer);
    addbutton($sub_menu_buttons,'{LASTUP_LNK}','{LASTUP_TITLE}','{LASTUP_TGT}','lastup',$template_sub_menu_spacer,'rel="nofollow"');
[b]addbutton($sub_menu_buttons,'{LASTHITS_LNK}','{LASTHITS_TITLE}','{LASTHITS_TGT}','lasthits',$template_sub_menu_spacer,'rel="nofollow"');[/b]
    addbutton($sub_menu_buttons,'{LASTCOM_LNK}','{LASTCOM_TITLE}','{LASTCOM_TGT}','lastcom',$template_sub_menu_spacer,'rel="nofollow"');
    addbutton($sub_menu_buttons,'{TOPN_LNK}','{TOPN_TITLE}','{TOPN_TGT}','topn',$template_sub_menu_spacer,'rel="nofollow"');
    addbutton($sub_menu_buttons,'{TOPRATED_LNK}','{TOPRATED_TITLE}','{TOPRATED_TGT}','toprated',$template_sub_menu_spacer,'rel="nofollow"');
    addbutton($sub_menu_buttons,'{FAV_LNK}','{FAV_TITLE}','{FAV_TGT}','favpics',$template_sub_menu_spacer,'rel="nofollow"');
    if ($CONFIG['browse_by_date'] != 0) {
        addbutton($sub_menu_buttons, '{BROWSEBYDATE_LNK}', '{BROWSEBYDATE_TITLE}', '{BROWSEBYDATE_TGT}', 'browse_by_date', $template_sub_menu_spacer, 'rel="nofollow" class="greybox"');
    }
    addbutton($sub_menu_buttons,'{SEARCH_LNK}','{SEARCH_TITLE}','{SEARCH_TGT}','search','');


    $sub_menu_buttons = CPGPluginAPI::filter('sub_menu',$sub_menu_buttons);
    $params = array('{BUTTONS}' => assemble_template_buttons($template_sub_menu_button,$sub_menu_buttons));
    $template_sub_menu = template_eval($template_sub_menu,$params);
}
/******************************************************************************
** Section <<<THEME_HAS_NO_SUB_MENU_BUTTONS>>> - END
******************************************************************************/
Title: Re: Last visited images
Post by: allvip on August 27, 2013, 12:47:17 pm
http://forum.coppermine-gallery.net/index.php?topic=25197.0 (http://forum.coppermine-gallery.net/index.php?topic=25197.0)

this was no help and final extract is for 1.4
Title: Re: Last visited images
Post by: Αndré on August 27, 2013, 01:22:18 pm
if is a core function,why is not in the menu?
A lot of features aren't enabled by default. However, if you'd like to add it to the menu I suggest to compare how it's done for the other buttons, e.g. search for {LASTUP_LNK} and you'll find another occurrence of that token in the function theme_main_menu. You'll have to add 4 new rows to the $param array. As there are no language strings in $lang_main_menu, you either need to hardcode them or you could use $lang_meta_album_names['lasthits'].
Title: Re: Last visited images
Post by: allvip on August 27, 2013, 03:09:39 pm
I used :

Code: [Select]
<!-- BEGIN lasthits -->
                        <li>
                            <a href="{LASTHITS_TGT}" title="{LASTHITS_LNK}" rel="nofollow"><span>{LASTHITS_ICO}{LASTHITS_LNK}</span></a>
                        </li>
<!-- END lasthits -->

and

Code: [Select]
'{LASTHITS_TGT}' => "thumbnails.php?album=lasthits$cat_l2",
'{LASTHITS_TITLE}' => $lang_meta_album_names['lasthits_title'],
'{LASTHITS_LNK}' => $lang_meta_album_names['lasthits_lnk'],
'{LASTHITS_ICO}' => cpg_fetch_icon('last_viewed', 1),

the icon is showing,the link is working but no title near the icon.
with firefox inspect element:

Code: [Select]
<ul>
<!-- BEGIN lastup -->
                        <li>
                            <a rel="nofollow"> title "Last Uploads"
                            href= thumbnails.php?album=lastuploads&cat0>
                            <span>
                               <img...</img>
                                  Lat Uploads
                        </li>
<!-- END lastup -->
<!-- BEGIN lasthits -->
                        <li>
                            <a rel="nofollow"> title "[b]BLANK-NOTHING[/b]"
                            href= thumbnails.php?album=lasthits&cat0>
                            <span>
                               <img...</img>
                                  [b]BLANK-NOTHING[/b]
                        </li>
<!-- END lasthits -->

<!-- BEGIN lasthits -->
                        <li>
                            <a href="{LASTHITS_TGT}" title="{LASTHITS_LNK}" rel="nofollow"><span>{LASTHITS_ICO}{LASTHITS_LNK}</span></a>
                        </li>
<!-- END lasthits -->
Title: Re: Last visited images
Post by: allvip on August 27, 2013, 03:11:26 pm
TRYED EVEN:

Code: [Select]
'{LASTHITS_TGT}' => "thumbnails.php?album=lasthits$cat_l2",
'{LASTHITS_TITLE}' => $lang_meta_album_names['lasthits'],
'{LASTHITS_LNK}' => $lang_meta_album_names['lasthits'],
'{LASTHITS_ICO}' => cpg_fetch_icon('last_viewed', 1),
Title: Re: Last visited images
Post by: allvip on August 27, 2013, 03:12:49 pm
http://allvip.us/gallery/index.php
Title: Re: Last visited images
Post by: Αndré on August 27, 2013, 03:13:14 pm
Add
Code: [Select]
global $lang_meta_album_names;to the top of the function. Your second code should work then, as $lang_meta_album_names['lasthits_title'] and $lang_meta_album_names['lasthits_lnk'] don't exist.
Title: Re: Last visited images
Post by: allvip on August 27, 2013, 03:27:23 pm
thanks.it worked.