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:
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?
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',
#:::
_______________________________________________________________
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.
#::: MyHack
echo gpPlugin::Filter('MyHack_SectionAdminLinks',array($section_key, $this->title));
#:::
#::: 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));
#:::
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
2K | Posts |
311K | 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.
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
2K | Posts |
311K | 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.
298 | Posts |
2K | Posts |
311K | Downloads |
16 | Themes |
18 | Plugins |
A new release for Typesetter is in the works with a lot of improvements including the ... Read More
Typesetter 5.1Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More
More News
What CMS: Find out what CMS a site is using.
Who Hosts This: Find out who is hosting any web site
WordPress Theme Detect: Find out which theme a WordPress site is using