Jump to content

vanderbreye

Members
  • Posts

    26
  • Joined

  • Last visited

Posts posted by vanderbreye

  1. 16 hours ago, kongondo said:

    the multi-language aspect of it is what I have no idea how to implement but it doesn't sound like a simple undertaking. Does it mean several inputs, one for each language? In that case it seems it is easier to just use pages (current setup) and have you multi-language descriptions there (text fields). 

    well, i thought it WOULD be easier to implement.  it is no problem showing the multilanguage-input on the frontend via api-forms, but i have no idea how to save the values the correct way. right now, i am implementing different things, also in the DB:

    multilang headline&copy fields and also a zoom-factor field for each hotspot. for now, i having 2 fields (headline/copy) for each language, which is a terrible implementation, though. shame on me. :(

  2. Nice Work again, Kongondo!

    still, i have a feature request:
    it would be great if there would be the possibility to add an editable multilanguage-descriptions to the markers (in renderRow()), similar to the % values of x/y..
    maybe even without having to "add"  a new marker via asmpageselect, but with a simple "add new marker" like in repeaters.

    This would be helpful for building simple hotspot-pages where it is no need of physically linked pages.

  3. hey! 
    i ran into a problem with image-description fields - its limiting to 256 chars, am i right?

    is it somehow possible to use another value here - or use more than 256 chars?

     

    i am using it via the Plugin MediaManager - but this uses the internal imagefield, i guess...
    thank you!
     

  4. :) sounds good!
    one question: is it somehow possible to search for image-descriptions through $pages->find("mm_image%=asmallpartofdescription") somehow?

    i would like to get my descriptions available in my general page search..

     

  5. haha. WTF. ok! :) 

     for now i simply copy-from-image-media  and overwrite the description for variations on save, which works... but it would be REALLY great, to have native multilanguage-support in the image-description (like it is in the core), i think. maybe, its something for the roadmap.

    beside that, it's a pretty solid work!

     

    • Like 1
  6. Hey kongodo!
    I still don't get how the form for the variation-description is rendered..

    i need to implement a multilanguage-solution, like i did for the original image...:

     

    $languages = $this->wire('languages');
                $this->wire('user')->language = $languages->get("default");
                            foreach($languages as $lang) {
                $this->wire('user')->language = $lang;
                    $this->wire('user')->language = $languages->get($lang->id);
                                $out .= '<label for="media_description_'.$lang->id . $mediaID . '">' .$lang->title . '</label>';
                                $out .= '<textarea class="lang" id="media_description_'.$lang->id . $mediaID . '" name="media_description_'.$lang->id.'">' . $m->description . '</textarea>';
                }
                

     

    but i have no clue...

  7. 16 minutes ago, kongondo said:

    To be honest, I haven't tried this.  The editor grabs what PW returns as the description. I am so ignorant when it comes to multi-lingual setups. Do files/images have multiple inputs for tags and descriptions in such cases?

    i set it up by myself, to be honest, more like hacked it.
    PW stores ML-Description as JSON {"0":"defaultlangtext","1022(aka LanguageID)":"anotherlangtext"}, and handles this internally. 

    i added a textarea-field for each language in the "edit" template, and hide your default "description" textarea.  In the "save"-event in JS i simply create the json out of the contents of the different textareas and copy it over in the default-textarea before saving the $page. ;) Not the best way, but it's working.
    you could also add different Fields like ("year", "artist", etc.) with this solution very quickly - by using other "ids" in the JSON.

    the only problem i have right now is to populate the fields correctly, but i will try it by bypassing the language-hook today.

     

  8. hey! i want to read a value from a $page which is a multilanguage-field. 
    it is important for me that i get that field NOT language-filtered, so the whole JSON string '{"0":"abdc","1063":"rguer"}'..
    is this somehow possible without switching the fileld to not-multilanguage? because i need the filtered output at other places...

    is there a possibility to read the RAW data? 

    thanks!

  9. hey @kongondo, that does the trick. Thank you! 
    maybe it is an option to make the selection obsolete, when the field is set to 1 Image only, and select it directly on click of the thumb?
    also, i would suggest to let the "add Media" Link be visible if the maximal image count is reached - and then simply replace the image instead of first having to select & delete & save the image /page to add another media. :) i know, its not THAT simple, but i guess this would be a big improvement!

    great module, though!
     

    • Like 1
  10. EDIT: solution found, thanks @kongondo

    Hi!
    I have a problem with this Module.
    I cannot select a single image to make changes in the description, etc, because it is always the FIRST image in the array selected (seen as the big image on the right).

    if i choose another one (yes, even, if i only select one instead of more) , i can INSERT it, but impossible to get it "selected" and shown on the right side to make changes.

    i have to use the filter to search for the image so that it will be in FIRST position on the left, only after this it is possible to select it.

    i'm on PW2.7.2
     

    Bildschirmfoto 2016-10-03 um 11.13.47.png

  11. is there any limitation?
    I'm worried that the PAGE-ID Field is (might be?) a INTEGER and can not be used with >65k pages.. or if there are any other limits in the core...

    (Currently I'm running a system with 25k pages, but there are chances to break the 100k limit... therefore i want to be prepared..)
     

  12. Im now trying something like this:

    https://processwire.com/talk/topic/6142-hide-page-tree-in-the-admin/#entry60087

    inside an own autoload module (used the helloworld-module) – but it doesnt work - all pages are still shown (front & backend)

    UPDATE: 
    it works, but i can only restrict access through the frontend - searches will be unaffected, the page will be found by $page->find() functions..
    is there a way how to hide the page in searches as well?

    what does not work, though the Page::viewable works: 
     

    public function init() {
     $this->addHookAfter('Page::listable', $this, 'hookPageListable');
    }
    
    public function hookPageListable($event){
         $page = $event->object;
          $event->return = false; // set listable to false if template "internal-page"
    }

    could this be a problem of where it is implemented? does the search use this Hook, if implemented in the helloworld-module?
     

  13. I want to hide pages in searches / views / lists, etc. which the user is not allowed to see. The system is not based on Users/roles, but on a special $VAR in the $SESSIONCOOKIE..

    if $page->users contains a value which is also in the $sessionvar of the viewing user, it should be viewable, otherwise it should not appear in any lists/searches/views...

    I know that its not secure in any way - this morel less should be some pseudo-restriction to keep UI/UX simple for some users...
    I think i need a BEFORE-Hook somewhere to keep things hidden in pageviews/lists/searches - but how to start?


    Important: this should also work for all children of a page - if the parent is restricted, all child pages should be invisible, too.

  14. Is it somehow possible to let page->render() use global variables?

    I want to render subpages in a template, which works fine for some cases.

    The problem:

    In the template there is an include, depending on a variable, which is set in the header.

    in the first head/ first template:

    $mobile = true;
    
    foreach($landingpage->children as $child) {
    echo $pages->get($child->id)->render();
    }

    and in the template:

     
    include_once("./header.php");
    if ($isMobile) {include("./mobile.inc");}

    but page->render() will (of course) not recognize the unknown $mobile variable.

    is there a way to render the page with all its variables?

    Best,
    Jan

     
     
  15. **** UPDATE ***
    nevermind. seems to be an issue with my server/php. by testing it on another server, everything runs as expected.

    thanks!

    ********************

    Hey ryan!

    i ran in a very special problem today: i moved a page to another server. (Im using V2.3)

    everything is good, except: i cant login as admin - because there is a problem rendering the submitbutton...

    in ProcessLogin.module i get a strange error:

    "Fatal error: Call to a member function attr() on a non-object in /Applications/MAMP/htdocs/[...]/wire/modules/Process/ProcessLogin/ProcessLogin.module on line 123"
     

    this is caused by trying to add the submitbutton rendered by InputfieldSubmit.module....

    BUT: if i uncomment 

    123: $this->submitField->attr('name', 'login_submit'); 124: $this->submitField->attr('value', $this->_('Login')); // Login form: submit login button 
     

    and 

    134: $this->form->add($this->submitField); 
     

    everything of the loginscreen gets sucessful rendered (but without a login button, which is... well.. unusable ;)

    the module itself (version 100) is fine, and taken fresh from git..

    (i'm running in the same problem using the password-forget module)

  16. Since yesterday, i suddenly get a 404 in the admin backend, trying to access ( /page/list/?id=1&render=RSS&start=0&open=undefined ).
    Everything else on the page works fine (as far as it possible to navigate)

    I enabled the debug-mode, but there are no clues given.
    RewriteBase is set correctly, all other pages (frontent as well as backend /setup/templates, etc) are shown - but not the page-list..

    I have no clue whats wrong...?

  17. Ok, it is simple to implement the S3 directly in the core upload ;)

    BUT: how should i begin to write the module, which binds on the uploadprocess?

    It is important to have file+tmp name of all uploded files in it. is there a hook i can use?

    a) hook in the uploadprocess and

    c) give a global option where to place the files: local / AWS / or both.

    B) hook in the output of the images+thumbs (based on options location)

    d) hook in the backend thumbnail view to show (based on options location)

  18. Hej!

    Has anyone ever tried to save & load the files in / from the S3 instead / beside of the local filesystem ?

    by using http://framework.zend.com/manual/de/zend.cloud.html it is very esay to implement to save/load:

    http://blog.ebene7.com/2011/01/21/amazon-s3-mit-php-stream-wrapper-verwenden/

    - but will PW work with it?

    By module? Or even better: a plugin that automatically saves/serves any files handled by the backend..

    We will now try to build this, but we'll also happy about any thoughts about it!

    • Like 4
  19. Is it possible to restrict the listing of pages/subpages based on the roles (user or role-access defined in a page?) FOR THE BACKEND?

    (The page has no frontend, only a complex json output of the different users' content.)

    i have multiple users which should not be able to VIEW or EDIT forign content.

    They all (should) have their own "parent"-page with children:

    It would be nice if the admin gives a "base-parent" for each user - where he is free to edit and create childs, but not somewhere else.

    The template of the parent and the child-Pages is always the same, thats why i dont want to / can't restrict access through the template.

    I also cant use the "settings-tab" on the page to give access, because it says:

    "Access is inherited from page "/" and defined with template: home"

    if i change the home-template-access:

    Template 'home' is used by the homepage and thus must manage access

    The plugin "page-roles" is not able to inherit the access to children, and its not possible to regulate EDIT/Create, only "view"...

×
×
  • Create New...