Topic Closed
rif.loom
2 Posts

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: 6 years ago#5975

Josh S.
2K Posts
262K Downloads
16 Themes
18 Plugins

Hi Rif,

You've clearly invested a fair amount of time on this, which is very exciting. I really like the masonry gallery!

There's so much in this post I might not have enough time to get to all of it at one time. I'll do my best though.

1) Is it possible to add created and modified username:time to section array

How about splitting up username and time like this:

$start_content['created'] = time();
$start_content['created_by'] = $gpAdmin['username'];

I've made the following changes: Add Modified... and Add Created...

As for copying, I'm not sure what to do. It's certainly possible to change values within the new file, I'm just not entirely sure why it needs to happen?

2) Thumbs size creation propotionally

I'm not sure this is going to work as is. Consider a new installation and a user who uploads 50 pictures and uses the thumbnails on their site. They then decide to change the thumbs_created_square setting and upload 50 more images. Now they have 50 square thumbnails and 50 rectangular thumbnails.

I think square thumbnails will always be created. I think the fix will be in creating additional thumbnails. Lets' brainstorm and figure this out!

3) Also, if possible please add estonian language (et).

I Would love to. The translation is only 25% complete at the moment though. As soon as we have an estonian translation for gpEasy we'll include the CKEditor translation.

 

I gotta run. I'll check on the rest of the ideas next time.

6 years ago#5994

rif.loom
2 Posts

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: 6 years ago#6000

Josh S.
2K Posts
262K Downloads
16 Themes
18 Plugins

Maybe add some more to editing.php func-SectionFromPost (for old sections what not have created time/use

That could work.

Thumbs:

I'd like to avoid confusing users as much as possible. Maybe we could add a setting to the gpconfig.php file

4-6

These mostly look like additional hooks. Would you mind submitting them on github? It's really easy.

  1. Log in to Github
  2. Navigate to the appropriate file. Ex: /include/tool/editing_page.php
  3. Click Edit
  4. Add hook code.
  5. Click "Propose File Change"
6 years ago#6046

feniweb
297 Posts

It would be very convenient if you could specify the size of the preview images for each gallery possibly even the alignment.

I have also been able to use.

Edited: 6 years ago#6067

Josh S.
2K Posts
262K Downloads
16 Themes
18 Plugins

It would be very convenient if you could specify the size of the preview images for each gallery possibly even the alignment.

I agree

6 years ago#6166

Topic Closed

 

News

Typesetter 5.1
8/12/2017

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

Over 8 Times Faster Than Wordpress
5/3/2016

We've known for a long time that Typesetter is fast. It's something we take pride ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In

  Register