Last visited images Last visited images
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Last visited images

Started by allvip, August 25, 2013, 03:21:30 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

allvip

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.


Αndré


allvip

thanks
I have to at 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:

addbutton($sub_menu_buttons,'{LASTHITS_LNK}','{LASTHITS_TITLE}','{LASTHITS_TGT}','lasthits',$template_sub_menu_spacer,'rel="nofollow"');

or


/******************************************************************************
** 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
******************************************************************************/


allvip


Αndré

Quote from: allvip on August 27, 2013, 12:44:57 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'].

allvip

I used :


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


and


'{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:


<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 -->

allvip

TRYED EVEN:


'{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),


Αndré

Add
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.

allvip