Jump to content

Thomas108

Members
  • Posts

    29
  • Joined

  • Last visited

Posts posted by Thomas108

  1. Hi there,

    I just installed textformatterfluidimages on a new site with the latest PW 3.0.98 and it doesn't work for me with images inserted by ckeditor.

    I tried with and without a custom class, but nothing happened, width remained and no class was given. Refreshed PW and browser cache.

    Am I missing something?

    Isn't this meant for ckeditor? Or do i need to call it somewhere? So far I just installed the module.

    Thanks for your help...

  2. Looks good to me.

    In the text on the left, I would clearly say that they can contact you by phone and talk about everything or if they prefer they can fill the form.

    I wouldn't recommend anyone nowadays a non responsive / or non mobile website.

    I'd rather explain this somewhere else as a quality aspect of your websites.

    I also wouldn't make Company Name a required field.

    just my 2cts

    • Like 1
  3. Thanks for all your answers.

    For now I successfully implemented Andre's code.

    But now I am aware of the url change.

    Would be great if I could somehow create a permanent 301 redirect to the new folder "older-entries" if someone wants to open a moved entry within the old folder "news-artikel".

    Any idea if this is possible?

    UPDATE: Just found the Redirects module. Maybe that can help me.

  4. Hi.

    I am using the news system from this tutorial: http://wiki.processwire.com/index.php/Simple_News_System

    Since the news are just short announcement for one time events, I would like to achieve the following:

    I want to give the editor a field for setting an expiry date.

    Expired news should automatically be removed from the main news page, but should be accessible in a folder "older entries".

    I searched the forum but I didn't find anything similar.

    Maybe something like this could work, but I don't know how to code this properly:

    $newsposts = wire("pages")->find("parent=/news-artikel/, $category, template=news, limit=10") (CONDITION)...WHERE EXPIRY DATE FIELD IS NOT EXPIRED  

    What do you think about this approach? Could it work and if so, how is this written properly?

    Thanks for your help in advance.

    Thomas

    PS:

    Here is the part from my code which fetches the news for the main news page:

    $newsposts = wire("pages")->find("parent=/news-artikel/, $category, template=news, limit=10");
    $out =" ";
        
    foreach($newsposts as $newspost){
        $out .="<div class='newsitem'>";        
        $datum1;
        $datum1 = $newspost->publish;
      $datum1 = date("d.m.Y - H:i", $datum1);
        $out .="<a href='{$newspost->url}'><h3>{$newspost->title}</h3></a>";
        $out .="<p>{$newspost->summary}</p>";
        if($newspost->news_image){
                $out .="<a href='{$newspost->url}' class=''>";
                $out .="<img class='align_left' src='{$newspost->news_image->size(300)->url}'>";
                $out .="</a>";
            }
        $out .="</div>";
    }

    PSS: For the folder "older entries" I guess, I can just use the original code again.

  5. Nope, I used only my correct image field names.

    I read about outputting images before and used this already extensively on a recent website.

    Thanks to PW I already made friendship with include, echo, foreach, if, get, and quite a few more, but I saw nowhere a tutorial about using fieldnames in curly brackets  {$image_1->url}. Are these special module tags or just plain php?

    Anyway, thanks for your input so far.

    Maybe I'll start fresh all over in a few days and see if it gets better somehow.

  6. A small sidenote request:

    I think it would be really great if you or someone else could supply eventually a basic set of demo templates for this module.

    Nothing fancy, no css, just the proper php and markup with maybe a few comments where to put what.

    Thanks for your consideration

  7. Sorry, but I think I did that right.

    Well now I allowed only one image in my image field and keep using

    $myImageField->url

    at least I have no errors.

    Do I maybe have to put the image url in a variable?

    <?php
    $headline1 = "";
    $headline2 = "";
    $image = $image_1->url; //my trial with a variable didn't work
    
    if(!$page->checkbox1) $headline1 = "<h2>{$page->title}</h2>";
    if(!$page->checkbox2) $headline2 = "<h2>{$page->text1}</h2>";
    
    echo "
    <div class='pageTableSection {$page->template->name}'>
        <div class='inner'>
            <div class='col one-half'>
                    {$headline1}
                    {$page->body}
                    {$image} // before trying the variable thing I had here: {$image_1->url;}
                    {$textblock_1}
             </div>
           </div>
    </div>
    ";

    Anyhow, from this code with or without the commented changes I am getting this markup in my layout field in the admin:

    <div class="pageTableSection part_tpl_1">
                            <div class="inner">
                                <div class="col one-half">
                                        <h2>wtf</h2>
                                     
                                    
                                </div>
                            </div>
    </div>

    Only {headline} gets outputted.

    Guess I am doing something really wrong here. :mellow:

  8. @mademyday: Thanks for your help

    I changed my code to:

    {$image_1->url} // my image field 1

    still my images are not visible in the layout elements. :mellow:

    But I just realized that I could revert InputfieldPageTableExtended.module to it's original state without getting an error.

    (And it had nothing to do with my false image call)

    I really don't know what I did to make the error dissapear, but it's gone. :rolleyes:

  9. Hi,

    first of all thanks for this great module.

    Unfortunately I can't get it to work as expected.

    I must admit that I just recently built my first website with pw and I haven`t even had a look at how the PageTable Module works.

    I use PW 2.5.3 dev and I installed PageTable and PageTableExtended modules.

    I created two templates with template files that contain the part template code from MadeMyDay on page one of this thread (plus my fields):

    <?php
    $headline1 = "";
    $headline2 = "";
    if(!$page->checkbox1) $headline1 = "<h2>{$page->title}</h2>";
    if(!$page->checkbox2) $headline2 = "<h2>{$page->text1}</h2>";
    // Output
    echo "
    <div class='pageTableSection {$page->template->name}'>
        <div class='inner'>
            <div class='col one-half'>
                    {$headline1}
                    {$page->body}
                    {$image_1} // my image field 1
                    {$textblock_1} // my text field
             </div>
            <div class='col one-half'>
                {$headline2}
                {$page->textarea1}
                {$image_2} // my image field 2
                {$textblock_1} // my text field
            </div>
        </div>
    </div>
    ";

    Then I created one image field and one Textfield and assigned them to my part templates.

    After this I created one PageTableExtendedField and selected my 2 part templates under the details tab and title,
    Image_1 and textblock_1 under the Input tab as table fields to display in admin.
    I checked: Render Layout instead of table rows
    I didn't put any stylesheet yet.

    In my basic-page.php I pasted this part:

    <?php
    $bodyclass='inner';
    $content = "{$page->body}";
    if(count($page->layout)>0){
         foreach($page->layout as $l){
             $content .= $l->render();
         }
    }
    

    What I am getting now in the backend is an error:

    Error: Call to a member function of() on a non-object (line 101 of /home/home1007/public_html/pw/site/modules/FieldtypePageTableExtended/InputfieldPageTableExtended.module)

    I outcommented line 101:

     // $parsedTemplate->page->of(false); // set OutputFormatting back to false, just in case

    Now I saw my part_templates as two buttons only in the backend.

    pw1.png

    After I expanded them I could enter title and name. I did this and then I was also able to enter an image and some text.

    Now it looks like this, both fields have an image, and some text, but in the layout elements only the titles are displayed:

    pw2.png

    Only when I press the edit button on the right side, I can see my image and my Text.

    Also the two buttons remain on the bottom. (Don't know if this should look like this)

    Obviously I did something wrong, but I couldn't find any more precise instruction for either PageTable or PageTableExtended.

    Please bear with me, I still got a lot to learn and I would be very happy if someone could tell what I did wrong or what I have to do more to set set this up properly.

    Regards, Thomas

  10. Wow great, you saved my day. :rolleyes:
     

    Believe it or not, some hours ago I tried to change the code with exactly the same line

    $(this).after("<small>" + $img.attr('alt') + "</small>"); 

    But I must have done something wrong, because the small tag appeared within the img tag. 

    I will study now what you did differently. 

    Thanks a lot!

  11. Hi Adrian,

    thanks for your input.

    I have a description in the images field and I also edited the settings in TextformatterImageWrapper.

    And yes, I changed  #bodycopy to my .content as one can see in the fiddle.

    Regarding your idea of using PageTable:
    I need  a page for a musician that contains one really long text about his life, where he wants to be able to insert about 20 - 30 floating inline images with captions all over the place.

    From what I have seen, I don't think that PageTable would be the best solution. And with fields and repeaters, I have to split the text in 20 or more pieces, so that I can combine it with image fields.

    I also don't like too much the idea of letting users place images in tinymce, but I have no idea how to do this otherwise.
    If someone has a better idea for me, please tell me.    

  12. Hi everybody,

    I am trying for a while now to display the alt tags as captions from images inserted via tinymce.
    I read this (and a few other) threads: https://processwire.com/talk/topic/1344-captions-for-images-in-tinymce/

    ... and I installed Adrian's tinymce-image-caption,
    but it didn't work at all for me.

    Then I installed Teppo's TextformatterImageWrapper,
    again no change in the frontend.

    Finally I tried Ryan's approach which is also mentioned in the linked thread above.
    https://github.com/ryancramerdesign/FoundationSiteProfile/blob/master/templates/scripts/main.js
    and again no change in the frontend output.

    The last days I felt like I fell in love with processwire, everything went very smooth, but today seems to be not my day. :huh:
    I have no clue what's wrong, maybe some pw (2.4.7) or php (5.4.32) version  problem? My template is valid html5.

    I just made a fiddle with ryans approach: http://jsfiddle.net/wqo4fk8o/10/
    Maybe someone can have a look and point me in the right direction?

    Thanks in advance,

    Thomas

  13. Yes, I have seen "Find" and it looks like a quite impressive search tool.

    "Find" and "Tree" are already there in PW 2.4.7. Will there be a change in behaviour in 2.5?

    If not, than that is not what I would like to have: A dropdown menu with all my pages when hovering over "pages" in the admin.

    Something like this:

    pages.jpg

    Obviously this may get complicated on large navigations, but for smaller sites it would be a comfortable time saver, I think

  14. The only thing I am concerned about, is this repeated pressure on processwire

    to make it more user friendly for non coders. I really - really hope the pw core

    with it´s template/field/backend will stay untouched.

    and for me as a non coder I hope that too, because I like the way pw works. pw should not become another droomlapress.

    It could be just way easier and faster to grasp pw for newbies willing to learn pw and php, if there was an "all in one place" page with up to date code and output examples

    • Like 1
  15. To keep a positive idea in this heavy ideological topics

    I like the idea of a snippet gallery this would be a nice addition on the tutorials for beginners?

    With the 2.5 it should be possible to export needed fields and templates and show some example calls on that fields.....so it would be a easy start.

    Like i wrote the wiki tuts was great but old and not really linked with the current docs.

    A dev use the great API documentation and the cheatsheet!!

    But a newcomer has to search the forum (and hopefully since the forum search isn't that good find first this or this post)

    Yep,

    so a newcomer can see at a glance the basic commands with output examples as well as a lot of working snippets in one place.

    Ideally everything with only basic styling and with the pw version number, when it was written / updated.

    If one needs more reading material one can look in the forum, if one needs less one can look at the stylesheet.

    Something for every level :rolleyes:

    • Like 2
  16. Something like when you click on "more" on the cheatsheet items -> ie. http://cheatsheet.processwire.com/pages/built-in-methods-reference/pages-find-selector/ ?

    Yes and No. When a non coder clicks on "more", he sees only more scary php stuff :rolleyes:

    Well, at least when one is no coder and very new to PW.

    Maybe I am the only one, but if a see a piece of php code, I try to understand it and I may understand it correctly or not. In any case it takes me quite some time. 

    On the other hand, if I see a piece of code and its immediate html output the learning is much faster, more easier and more accurate. 

    So I am missing html output examples.

    @Nico Knoll: Yes from the domain name it sounds like something I would love to see.

    • Like 2
  17. @Thomas108, something like this: http://wiki.processwire.com/index.php/Basic_Website_Tutorial

    Thanks Joss

    No, that website tutorial is already way too much text about html and adding styles and philosophy.

    On the other side there is the api cheatsheet which is great for developers, but for a non coding beginner too condensed and even a bit scary.   

    I mean something like an extended version of the api cheatsheet, and also with more complicated snippets and their output.

    So that even a noob can look at a piece of code and immediately see what it does by looking at its manifested html output.

    And everything on one page, just like twitters bootstrap docs:

    php ....

    the html output

    php ....

    the html output

    and so on.

    • Like 2
  18. Dear Processwire folks.

    For me as a non coder, this is a very important discussion, therefore I would like to add my 2cts for your evaluation.

    What I would really love to see in PW is a one page code documentation, just like the twitter bootstrap docs.

    A page with just some basic styles so that any newbie, or non coder can see at a glance which code does what!

    Something like this:

    INCLUDE HEAD (OR OTHER EXTERNAL PHP FILES):
    **************************************************
    php include ("./head.inc.php");
    _________________________________

    NAVIGATION WITH DROPDOWN:
    Home | Page 1 | Page two
    Dropdown 1
    Dropdown 2
    **************************************************
    php $ function bla bla
    _________________________________

    DISPLAY IMAGES:
    image-1.jpg
    Image-2.jpg
    **************************************************
    php $ foreach bla bla
    _________________________________

    DISPLAY FIELD(S):

    Example Field title
    Eample field body

    **************************************************
    php $ echo bla bla
    _________________________________

    And then of course more advanced stuff.

    In fact, if there would be a simple styleguide, many developers could contribute to this document over time.

    If one has made something fancy and wants to share it, he or she can submit the documentation code to a moderator who adds it to the document.  

    Please, what do you think about this??

    Thomas108



     

    • Like 2
×
×
  • Create New...