Posts by: rif.loom

Posts: 2
Post: 6000
Topic: Need hooks and some changes for plugin

Thanks Josh ... and thanks to finding time for my :-)

I modified my scripts and modif/creat user/time working fine.
Maybe add some more to editing.php func-SectionFromPost (for old sections what not have created time/user)
        if(!isset($page->file_sections[$section_num]['created'])){
            $page->file_sections[$section_num]['created'] = time();
            $page->file_sections[$section_num]['created_by'] = $gpAdmin['username'];
        }

Thumbs:

Maybe then default is square  but when user want propotional tumbs then selecting box. I example want propotional thumbs in all my site but when i want  some gallery have a square thumbs then i unselecting box and upload my gallery images or using css for doing that. For now this is better than nothing i think :-) and future finding better way for this (it take a time i know).
I am working another site where siteowner want poster galleries 250x250 square thumbs (He's artist) and all parties photogalleries rectangular/propotional  thumbs (masonry). :-). Another gay make all images 700x400 and want all their  thumbs only smaller (not square).
Thear no broblem, i think, when images/thumbs in one folder is different than another and if user dont want playng this, then ... default is square :-)

I love your CMS, i worked my own about 10 yeras but when i find GPEasy i want working for this ... thank you

Edited: 9 years ago
Post: 5975
Topic: Need hooks and some changes for plugin

Hallo! 

I am estonian and i am verry sorry, my english is verryverry  bad. I am not a time to find some person who corecting my text  and i do not want to use my wife or  google to do this. I hope you undestand what i write out  : -)

I dont know it is the right place to put my questions? Sorry if not :-(

I made some core hacks in your wondeful CMS ( I verry like it, thancs:-) ). My hacks in one php file, i included it, adding some lines to core 
and result is this http://www.rohusaar.net.ee/GPE/index.php/maalid_aastast_2003 (thear is link "kommentaarid" and you see gallery using masonry layout)

This not redy jet and i planned more. This is somthing like your latest options link for section edit menu for adidng some properties to section array.
(features is expandable sections (future maybe sections to tab), jquery masonry layout for gallery and more opportunityes for any section, like some java and css)

But now I want to make plugin (maybe named "Section Layout Suite") instaed to hacking core.
Thear is testing site and pictures for undestanding what i mean. http://www.panwagen.ee/CMS/gpeasylatest/

Below is what i doing and my questions:

  1. ... is bossible to adding created and modified username:time to section array

    tool/editing_page.php .... func-SectionEdit
    #::: MyHack
    global $gpAdmin;
    $this->file_sections[$section_num]['modified'] = $gpAdmin['username'].":".time();    
    #::: 

    tool/editing_page.php.... func-AddNewSection
    #::: MyHack
    global $gpAdmin;
    if( isset($_POST['copy']) ){
    unset($start_content['created']);
    unset($start_content['modified']);
    }
    $start_content['created'] = $gpAdmin['username'].":".time();
    #:::

    PS! BROBLEM IS ... admin/admin_menu_new.php func-CopyPage
         it coping file and not change created and modfing time (in pagefile).
        When i copyng page, why not changes page greating time/user and also change sections username:time-s. (maybe new created time +      some second for each section like section1 +1sec, section2 +2sec etc.)
        In pagefail contain greated username. Maybe add to page file last modified username to? 

  2. Thumbs size creation propotionally.

    tool/images.php ..... func-CreateRect (func is not use enywhere?)
    #::: Myhack - make thumbnail creation propotionally
    $new_w = "";
    $new_h = ""; 
    #:::
    return thumbnail::createImg($src_img, $dest_path, $dst_x, $dst_y, 0, 0, $temp_w, $temp_h, $old_w, $old_h, $new_w, $new_h);

    And for admin configuration (picture http://www.panwagen.ee/CMS/gpeasylatest/data/_uploaded/image/ThumbCreation.PNG)

    admin/admin_uploaded.php ..... func-CreateThumbnail
    #::: MyHack - $config['thumbs_created_square']
    if (!empty($config['thumbs_created_square']))
    #::: 
        thumbnail::createSquare($original,$thumb_path,$config['maxthumbsize']); //original line        
    #::: MyHack - make thumbs propotionally not square
    else
    thumbnail::CreateRect($original, $thumb_path, $config['maxthumbsize'], $config['maxthumbsize']);    
    #:::

    admin/admin_configuration.php ..... func-admin_configuration
    #:::MyHack - new selectionbox                        
    'thumbs_created_square'=>'boolean',                        
    #:::

  3. Allso, if bossible please add estonian language (et). I planned to translate gpeasy. (PS! CKeditor have estonian lang ... this not change to estonian when i edit ckeditor config)

    _______________________________________________________________
    And forth .... I trying do make some hooks (gpplugin::filter/action)...
    i know thear is better way to do this :-), i dont understand all the scripts and i am not a proffesional but maybe You undestand my better if i add my experimental working hooks.

  4. Need to but link to section edit menu (like Your "options...").
    tool/editing_page.php .... func-GenerateContent_Admin

    #::: MyHack
    echo gpPlugin::Filter('MyHack_SectionAdminLinks',array($section_key, $this->title));             
    #:::

  5. printing out
    tools/editing_page.php .... func-GenerateContent_Admin()

    #::: MyHack
    $content .= gpPlugin::Filter('MyHack_BeforeSection_s',array($section_data,$section_num)); 
    #:::            
            $GP_NESTED_EDIT = true;
            $content .= section_content::RenderSection($section_data,$section_num,$this->title,$this->file_stats);
            $GP_NESTED_EDIT = false;            
    #::: MyHack
    $content .= gpPlugin::Filter('MyHack_AfterSection_s',array($section_data,$section_num,));          
    #:::
        
    tools/SectionContent.php .... func-Render()
    #::: MyHack             
    $content .= gpPlugin::Filter('MyHack_BeforeSection_s',array($section_data,$section_num)); 
    #:::        
            $content .= self::SectionToContent($section_data, $section_num);
    #::: MyHack
    $content .= gpPlugin::Filter('MyHack_AfterSection_s',array($section_data,$section_num));             
    #:::

  6. ModalWindow form and save/edit sectionlayout props

    i am not find a better way :-(
    tools/editing_page.php .... func-RunScript() 
    switch($cmd){        
    case 'MyHack_section_layout_properties':                
    gpPlugin::Action('MyHack_Section_Layout_Form'); 
    return;

    And edit/save ...
    tool/editing_page.php .... func-SectionEdit
    #::: MyHack
    if( gpPlugin::Filter('MyHack_Section_Layout_EditSave',array($cmd, $this->file_sections, $section_num))){
        $this->file_sections = gpPlugin::Filter('MyHack_Section_Layout_EditSave',array($cmd, $this->file_sections, $section_num));
        $this->contentBuffer = $this->GenerateContent_Admin();
    }else  
    #:::
            if( !gp_edit::SectionEdit( $cmd, $this->file_sections[$section_num], $section_num, $this->title, $this->file_stats ) ){
                return;
            }

I hope You understand my. :-)
Best reggards
Rif

Edited: 9 years ago

News

elFinder 2.1.50 in Upcoming Release
12/28/2019

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1
8/12/2017

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Ennetb├╝rgen (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Websi...

Find out more about our Provider Spotlight

Log In

  Register