Jump to content

rolspace.net

Members
  • Posts

    48
  • Joined

  • Last visited

Posts posted by rolspace.net

  1. 6 minutes ago, Soma said:

    That's a bug in PW that's in there since years. I once tried to make sense of it but after hours of try and error I gave up. If you upload a bunch of images (only drag and drop), sometimes images get lost on the way, though they're uploaded they're not saved in DB. All issue reports end up having "not reproducible, needs more information, discussion". Ryan's too busy with new features than trying to track down those (understandable though if you can't reproduce).

    Thanks for the info, Soma. What would you suggest? Just try and hope it works at some point? do you have a workaround idea? Several image fields?

  2. 13 hours ago, kongondo said:

    Have a look in the file system for the 'created' image thumbs (/site/assets/files/1234/, where 1234 is the ID of the page with the images. Were the 250 by 250 image thumbs created correctly or they are not viewable/blank? Also, what size are the images you are uploading? 

    Well, it seems that the problem starts much earlier. I can upload around 150 images (width 1600px, size between 300 and 600KB), after that, processwire does not store them anymore.....

  3. 6 hours ago, kongondo said:

    What does echo $page->images->count() return;?

    it returned 96. Then I added the files like 10 at once instead of 50 and then it worked again. for a while. up to 162 images. Then the same again. I can add more pictures, save the page, leave and come back to it and the images are gone (the ones I just uploaded). this is really weird...

  4. Hi all

    I have a problem here. I created a gallery with 240 pictures. Created an images field with no maximum amount (0). Unfortunately, only 98 of the 240 images show on the website. Any idea what I possibly could have done wrong? Thanks for your help!

    <?php 
            foreach ($page->images as $image) {
            $options = array(
              'quality' => 90,
              'upscaling' => false
            );
            $thumb = $image->size(250, 250, $options);
          ?>
            <div class="col-xl-2 col-lg-3 col-md-4 col-sm-6 col-6 foto">
             <a href="<?= $image->url ?>" data-lightbox="lightbox" >
              <img src="<?= $thumb->url ?>" alt="" >
             </a>
            </div>
          <?php } ?>

     

  5. Thanks @Zeka

    But I don't know where to put that code to make it work..

    <?php
      foreach ($pages->get('/produzenten/')->prod_repeater->sort('prod_objekt') as $produzent) { 
    ?>
    <div><a><?= $produzent->prod_objekt ?> <?= $produzent->prod_hausnummer ?>, <?= $produzent->prod_ort ?></a></div>
    <?php
      }
    ?>

    The above will only sort by prod_objekt (streetname)...

  6. Hi all!

    I have a little problem here. I want to sort a list of addresses by streetname and then by number. First, I just had a field "prod_objekt" (address) containing both and then have a foreach loop like this: $pages->get('/produzenten/')->prod_repeater->sort('prod_objekt') as $produzent. Unfortunately, this would not sort by streetnumber if I had the same streetname but multiple numbers.

    Now, I thought I could sort by two fields. prod_object (adress) first and then by prod_hausnummer (streetnumber). But I just don't know the code for it. I tried this: $pages->get('/produzenten/')->prod_repeater->sort('prod_objekt.prod_hausnummer') as $produzent, but it wouldn't work.

    Any ideas on how to solve this?

    Thanks for your help

    Roli

  7. 16 hours ago, netcarver said:

    Do you know if the client is using the DomainServer Basic package. The FAQ pages say that htaccess files aren't even allowed for sites hosted on that service.

    It might be worth emailing the support folks at the host and asking the question direct to them.

    @netcarver yea, I saw that, but it's not that package. I had contact with their support and they just said "it's not allowed to use options".....

    • Sad 1
  8. 31 minutes ago, DaveP said:

    I think you'd be safe to comment all that section out.

    
    # -----------------------------------------------------------------------------------------------
    # 1. Don't show directory indexes, but do follow symbolic links 
    # 500 NOTE: Some cloud hosting companies don't allow +FollowSymLinks. 
    # Uncomment +SymLinksifOwnerMatch and comment +FollowSymLinks if you have 500 errors. 
    # If that doesn't resolve the error, then set it back to +FollowSymLinks. 
    # -----------------------------------------------------------------------------------------------
    
    # Options -Indexes
    # Options +FollowSymLinks
    # Options +SymLinksifOwnerMatch

    Worst that can happen? Still doesn't work.

    it doesn‘t work. i think i need an alternative code for ‚options -indexes‘ but without the ‚options‘...

    • Sad 1
  9. Hi Guys,

    Just finished a website locally and wanted to upload it on the webserver of my customer. I got a server 500 error. Now, the guidelines of the hoster (world4you.com) does not allow "Options" in the htaccess-file. So, when I uncomment these:

    Options -Indexes
    Options +FollowSymLinks

    the site is visible, but the content won't show and no links are available. Not sure if I need the Symlinks-part but I guess I need a workaround for the Index-part. Can anybody help here? I need the website up and running asap....

    Thanks!

    Roli

  10. Guys, me again. I'm still trying to wrap my head around this module. How can I achieve the following structure:

    Home
    -- Submenu 1 (anchor #)
    -- Submenu 2 (anchor #)
    ...

    Products
    -- Submenu 1 (anchor #)
    -- Submenu 2 (anchor #)
    ...

    and so on.... I need a clickable first menu-level (home and products are main sites and need to remain clickable). and then I need the submenus to be anchors, so clicking on the link jumps to the correct position on this or the other page. Is this possible. Or is it done differently in Processwire? Url segments maybe (tried to understand this, but no luck..)?

    Thanks for any help...

  11. Hi Everyone

    I have a problem here. I have built a site with Processwire on localhost and then transferred to my customer's server. a) it's a windows server (unfortunately) and b) there is a domain-mapping for this site, the domain points to a folder of another domain. Sorry, I can't explain it any better, I don't really understand the different types of servers (why do they have to be different anyway...).

    My problem is, that I see the main website but not the admin page. Do I have to add anything to my .htaccess file?

    I also tried to include web.config file. Not .htaccess nor web.config file have an impact when changing its content. I really have no clue what to do!!

    Links: mcconnellacademy.ch, mcconnellacademy.ch/admin

    Thanks for any pointing in the right direction!

  12. 35 minutes ago, Soma said:

    I?m not sure I understand the problem. The "News" entry has a class "active" as it should, but it doesn't show the children as they're hidden dropdown. Seems more like a problem with your html css js.

    aaah! now I see! sometimes, you don't get the most obious things. Thanks Soma!

  13. Hi everyone, me again.

    I have a problem with my MarkupSimpleNavigation Setup. This is the structure (the important part of it):

    - about
    	- news (visible in navigation an marked "active" when news-items are selected
    		- news-item 1 (not visible in navigation, link will be on the news site)
    		- news-item 2  (not visible in navigation, link will be on the news site)
    		- news-item 3 (not visible in navigation, link will be on the news site)

    From what I found in the forums I have the following php-code for the markup navigation:

    <?php
                        
                            /*
                              MarkupSimpleNavigation Example for Bootstrap 2.3.2 Multilevel Navbar
                            */
                            // load MarkupSimpleNavigation module
                            $nav = $modules->get("MarkupSimpleNavigation");
                            /* SETUP HOOKs ------------- */
                            // hook to have custom items markup 
                            $nav->addHookAfter('getTagsString', null, 'customNavItems');
                            function customNavItems(HookEvent $event){
                                $item = $event->arguments('page');
                                // first level items need additional attr
                                if($item->numChildren(true) && count($item->parents) < 2){
                                    $title = $item->get("title|name");
                                    $event->return = '<a href="#" class="dropdown-toggle" data-toggle="dropdown">' . $title . ' <b class="caret"></b></a>';
                                }
                                
                                // submenus don't need class and data attribs
                                if($item->numChildren(true) && count($item->parents) > 1){
                                    $event->return = '<a href="#" class="active">' . $item->get("title|name") . '</a>';
                                }
                            }
                            // hook to add custom class to li's that have submenu
                            $nav->addHookAfter('getListClass', null, 'customListClass');
                            function customListClass(HookEvent $event){
                                $item = $event->arguments('page');
                                // if current list item has children and is level 2 from root
                                if($item->numChildren(true) && count($item->parents) > 1){
                                    $event->return = ' dropdown-submenu'; // adds class to li
                                }
                            }
                            /* Render Navigation Markup ---------------- */
                            $navMarkup = $nav->render(
                                array(
                                    'max_levels' => 3,
                                    'parent_class' => 'active',
                                    'current_class' => 'active',
                                    'has_children_class' => 'dropdown', // all li's that have children
                                    'outer_tpl' => '<ul class="nav navbar-nav pull-right">||</ul>', 
                                    'inner_tpl' => '<ul class="dropdown-menu">||</ul>', 
                                    )
                                );
    
                        echo $navMarkup; ?>

     

    I want the navigation link "news" to show the template "news" with links to the "news-items" (that's what I have). "News" should always be "active" when "news" or "news-item" are clicked. What am I missing here?

    this is what it looks like so far: http://rolspace.net/hd/energiegossau/uber-uns/news/

    Thanks for your help.

    Roli

     

     

     

     

  14. 2 hours ago, Macrura said:

    I would just do a normal page for news ; your sidebar and main content would be separate things, and then your news template shows the $page->body, this way the news pages are indexable, and bookmarkable.

    the links need to links to the ->url parameter,so if you are foreaching the news items on the sidebar as $item, then the href is $item->url;

    Thanks for the input. It works.

    Have a great day!

  15. 19 hours ago, Macrura said:

    comments:

    1) You might want to consider using pages instead of repeater for news items (repeaters are not really meant for infinitely scaling content types)
    2) Sounds like you want to use ajax to change the content of the news article that was clicked on, on the left side? - maybe take a look at this: http://barbajs.org/

    Thanks Macrura, I changed the news items as subpages now. But I'm still left with the same problem. I don't know how to fill my news container with the content when I click on the links. I've tried using AJAX but I guess, I just don't know how. barbajs also seems way to complicated for me. Any ideas?

    Where I'm at:

    I have news-items containing date, title, text and images. on the right side, I have links containing date and title. When one of the links is clicked, the container is supposed to fill with the right news details.

    Any ideas anyone?

×
×
  • Create New...