Advanced search  

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

Pages: 1 2 [3]   Go Down

Author Topic: Final_Extract - Removing blocks & items like menu buttons  (Read 101934 times)

0 Members and 1 Guest are viewing this topic.

Aeronautic

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 125
  • Photographer / film maker turned webmeister...
Re: Final_Extract - Removing blocks & items like menu buttons
« Reply #40 on: October 03, 2006, 10:44:10 pm »

Somehow I must have messed this up, but I can't figure out how.

Running the 2nd version of the plugin in CPG 1.4.9 - Hardwired

http://www.aeronauticpictures.com/royalty-free-stock-footage/

When I ran it with the default code it worked as expected. Then I removed the block of the home page part for guests and added the other blocks I wanted out for guests.

FYI: I only have admin and guests - nobody else will register and use the gallery.

My goal is for guests to see home, custom, search and album.

Any ideas where I went wrong? It is showing blocks to guests instead of hiding them. Yes, the plugin is enabled and installed. I tried uninstalling, unenabling and back again too.

Is this the "<!-- BEGIN block -->  <!-- END block -->" issue from theme.php?

Edit: It was this tag block issue. Changes made to hardwired/theme.php to add block tags. Now working at link above.

Code: [Select]
function final_extract_page_html($html)
{   
$user_group=USER_ID;
//define the user group
switch ($user_group){
case 1://admin show all menus
return $html;
break;
case 2://registred
//repeat the next line for each block you would like removed
final_extract_block($html, 'login');
    final_extract_block($html, 'home');
    return $html;
break;
case 3://guest
//repeat the next line for each block you would like removed
    final_extract_block($html, 'lastup');
    final_extract_block($html, 'toprated');
    final_extract_block($html, 'favpics');
    final_extract_block($html, 'lastcom');
    final_extract_block($html, 'topn');
    return $html;
default://all othe cases
    //repeat the next line for each block you would like removed
    final_extract_block($html, 'lastup');
    final_extract_block($html, 'toprated');
    final_extract_block($html, 'favpics');
    final_extract_block($html, 'lastcom');
    final_extract_block($html, 'topn');
return $html;
}

Thank you for the plugin and the help!

Edit: Found this post: http://forum.coppermine-gallery.net/index.php?topic=26893.msg160551#msg160551

Looks like it could be the call out in Hardwired. Will test and update.
« Last Edit: October 03, 2006, 11:30:23 pm by Aeronautic »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Final_Extract - Removing blocks & items like menu buttons
« Reply #41 on: October 04, 2006, 05:55:59 am »

Running the 2nd version of the plugin in CPG 1.4.9 - Hardwired

My goal is for guests to see home, custom, search and album.

BTW you can use Final extarct 2.3 with admin panel and group selection here:
http://forum.coppermine-gallery.net/index.php?topic=36605.0
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Aeronautic

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 125
  • Photographer / film maker turned webmeister...
Re: Final_Extract - Removing blocks & items like menu buttons
« Reply #42 on: October 04, 2006, 08:36:44 pm »

Thanks Sami!

Will give that a try too.

Logged

lily64

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Final_Extract - Removing blocks & items like menu buttons
« Reply #43 on: November 14, 2006, 05:41:22 am »

I am very distressed because I just used this Final Extract and as soon as I uploaded it and loaded the admin panel, the gallery ceased to function period.  I have spent countless hours getting this gallery customized for a client and don't understand why this would cause it to no longer function at all.

The gallery is here: http://www.liveedgepottery.com/cpg149/
Logged

lily64

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Final_Extract - Removing blocks & items like menu buttons
« Reply #44 on: November 14, 2006, 05:53:25 am »

Got it.  Went into PhpMyAdmin and deleted the Final Extract from the DB, which then freed it up.  I have no idea why this would cause this, but will not use it that's for sure unless there is a fix.

Thanks.
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Final_Extract - Removing blocks & items like menu buttons
« Reply #45 on: November 14, 2006, 08:39:52 am »

Final Extract works perfectly. Really usefull tool to clean up the look of CPG for the users and guest users.

Dutch language file attached.

Cheers!
Hein
Logged

MaPzel

  • Coppermine newbie
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • TWV Hengelo.com
Re: Final_Extract - Removing blocks & items like menu buttons
« Reply #46 on: February 15, 2011, 02:51:27 pm »

For some reason my pluginmgr does not work with my Joomla integration. After ftp uploading 'Final Extract' I want to install it, but the pluginmgr gives the following error:

Code: [Select]
Fatal error: Cannot redeclare deldir() (previously declared in /home/vhosts/twvhengelo.com/httpdocs/fotoalbum/pluginmgr.php:239) in /home/vhosts/twvhengelo.com/httpdocs/website/plugins/system/legacy/functions.php on line 713
Is it possible to insert the code from the plugin (codebase.php) into a custom theme.php? Or should the php code be inserted in an other file? I don't know exactly where the final html display codes are generated.

I already tried to insert the next code into my theme.php after 'function theme_display_fullsize_pic()' and just before '?>
<!DOCTYPE html PUBLIC.....'

Code: [Select]
function final_extract_block(&$template, $block_name, $subst='')
{
        $pattern = "#(<!-- BEGIN $block_name -->)(.*?)(<!-- END $block_name -->)#s";
        if ( preg_match($pattern, $template, $matches)){
            $template = str_replace($matches[1].$matches[2].$matches[3], $subst, $template);
            return $matches[2];
        }
}

function final_extract_page_html($html)
{   
    //repeat the next line for each block you would like removed
  final_extract_block($html, 'login');
  final_extract_block($html, 'home');
final_extract_block($html, 'my_gallery');
final_extract_block($html, 'allow_memberlist');
final_extract_block($html, 'my_profile');
final_extract_block($html, 'enter_admin_mode');
final_extract_block($html, 'leave_admin_mode');
final_extract_block($html, 'upload_pic');
final_extract_block($html, 'register');
final_extract_block($html, 'faq');
final_extract_block($html, 'logout');
final_extract_block($html, 'upload_pic');
// final_extract_block($html, 'lastup');
//     final_extract_block($html, 'toprated');
//     final_extract_block($html, 'favpics');
// final_extract_block($html, 'search');
// final_extract_block($html, 'lastcom');
// final_extract_block($html, 'album_list');
// final_extract_block($html, 'topn');

return $html;
}

My album can be viewed here: http://www.twvhengelo.com/website/index.php?option=com_wrapper&view=wrapper&Itemid=57

Or http://www.twvhengelo.com/fotoalbum for displaying only the Coppermine installation

I'm running the Joomla 1.5.21 and Coppermine 1.4.27
Logged
Pages: 1 2 [3]   Go Up
 

Page created in 0.02 seconds with 19 queries.