Jump to content

Bike

Members
  • Posts

    30
  • Joined

  • Last visited

Posts posted by Bike

  1. Hi everyone,

    another question concerning image behavior.

    Everytime I double click an image in CKEditor to adjust alignment, the image size is being resized according to my screen height which is fairly annoying.
    I'd like to keep that size at maximum.

    I could not find the right code segment where to deactivate this behavoir. I guess it must be somewhere in the CKEditor plugin code?!

    Can anyone help?

  2. Hi everyone,

    I insert images into a textarea where I keep their original upload size (about 1200px in width), so that when I eventually open them up on the page they will show up as large as possible in a lightbox.

    How can I achive that all images are output as a thumb in the first place? For image fields that I have control about I would use $img->size() but since everything is packed into that $page->body field I don't know how to get in there?!

    In the end I want something like:

    <a href="url_to_original.jpg" data-fancybox>
      <img src="url_to_thumb.jpg">
    </a>

    That a-tag however I build around the image during output with some str_replace since I don't know how to do this in the right way either ? It works anyway but all that image-in-a-body thing is quite a mystery to me still.

    I'd be grateful for any help!

  3. Thanks @Gideon So, I actually managed to get it working with a hook.

    Now I have another field that lists all items of a repeater field. It looks like this:

    Unbenannt-2.jpg.1f5625d040b4aa08ae7c9f7f0e0b8e82.jpg

    Is there a way to change the appearance of that label which is showing that mysterious numbers?
    I'd like to have a simple numberation (since the repeater items have no titles).
    Do I have to change the hook code to achieve that? I have no clue ....

  4. Hi everyone,

    I have pages each with a PageReference field.

    Now I need to set up a selector for that field to show only their child pages.

    It must be something like parent.id=1024 but without that fixed id. Or maybe I need a totally different selector?

    Does anyone unterstands? ?

  5. Hi everbody,

    I still didn't find any solution for this problem though I think it might be something not too fancy.

    Looking for a select field (ASM too!) with language tabs. For each language there is not only a translation but an entirely different content.

    Ex: Select field "Publishers". Field holds different lists of publishers for each language EN / DE / ES.

    Or: ASM Select "Available as". Holds options such as "book", "ebook", "audiobook". Different selection possible for each language.

    In case I am not making it clear enough have a look at the pictures ?

    Unbenannt-3.jpg

    Unbenannt-4.jpg

  6. Thanks @wbmnfktr, seems to be the right track though I cannot get it working properly. Code is like:

    $options = array(
        // markup tags that are allowed. Example: "<br/><strong>"
        'allowableTags' => '<p>',
        );
    
    $p->text = $sanitizer->purify($data["comment"], $options);

    Other tags still appearing.

    Also I tried to use $markupHTMLPurifier as there are many more options such as br to p, remove emtpy p etc. which doesn't seem to be available in $sanitizer. But the function is unknown.

    Any clue?

  7. Hi everyone,

    currently I am transferring data from an old database to PW using the API.

    Textarea in old DB be like: <p>...</p><div dir="somecrappytags">i don't want that</div>

    Textarea in new DB, of course is exactly the same BUT: when I open and save that textarea in admin, CKEditor replaces all the divs with <p>, and that is what I do want!

    How can I achieve that formatting CKEditor does within the API? Like simulating open up and save the data in the admin to get rid of all those stupid tags and just keep the paragraphs? Is it sanitizer stuff?!

    Does anyone understand? ?

  8. Hi everyone,

    I still did not figure out how to set up an select options field with different content for each language.

    I think it must be a simple thing to do and something you would need fairly often. Am I wrong?

    Another thing is that I need option field that are populated by other fields (or pages?) and don't know what to look for ? Could anyone tell me where to start with that?

    Thanks a lot!

  9. Hi everyone,

    on some preferences template there is a repeater field containing fields like 'link' and 'url' (and maybe some more). That repeater field is populated by the client.

    On another template I'd like to have a select field which outputs the repeater's content each as an option so I can have it on the page like $select->link, $select->url, $select->whatever_is_in_the_repeater_field

    I think this should acutally be a common thing to do but I don't know how to accomplish it.

    Any ideas? Thanks ?

  10. Thanks @Jan Romero, you understood right.

    To make it more clear: In admin I want all the books in a seperate branch so my client does not get confused with the other pages. On the actual page then I want all the books to be on /books/book-1 ... along with the other pages such as books/q-and-a or /books/upcoming. I do not want one page with different URLs, I just want to separate them in the admin.

    You mentioned urlSegments which I'm going to have a look at. ✌️

  11. Hi everyone, I didn't know what to even search for so I started this topic.

    I have a page say 'books' with some children such as 'specials', 'q&a', 'upcomig' etc. On that page I want to list books which are at the moment as well children what causes the books and the other pages mentioned above get mixed up in the same branch at the admin page and that's something I do not want.

    I'd like to have a seperate hidden page 'all books' where I draw all the books from but they should behave like being children of 'books''. That's because I want to like to detail pages and their paths should be /books/book-1 etc. and not /all-books/book-1 ...

    I hope it gets clear and is somehow possible. Thanks, already!

  12. Still not working...

    I managed the desired fields to show up in the repeater / textarea tab but whatever I try to overwrite won't apply. So I'd like to change the editor toolbar just for that purpose but it's not working. Have to change it in the basic textarea properties what I don't want because it is then globally changed. ?

     

×
×
  • Create New...