Jump to content

biber

Members
  • Posts

    75
  • Joined

  • Last visited

Community Answers

  1. biber's post in line break in image description field was marked as the answer   
    Thanks for your help. I didn't find a module "TextformatterNewlineBR" but one called "TextformatterAutoParagraph", which seemed to comply with my request. As you described I installed it and added it to the textformatters box, but above the "HTML Entity Encoder" and --Yippee!-- all texts are formattet properly.
    @ Kixe:
    Thanks for your suggestion. But the simple way netcarver showed me just fixed my problem, so I did not try to find another solution.
    Great CMS - Great forum
    Günter
  2. biber's post in Cannot edit gallery pages was marked as the answer   
    In the server's log I found the answer: PHP Warning:  Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini.
    After setting this option to 10000 (don't know this value is choosen reasonable) everything works fine again.
  3. biber's post in Filling an urlSegment by a link was marked as the answer   
    Thanks for your help.
    I have now realized my gallery with a combination of url-segment (for choosing the image to enlarge) and get-procedure (for to change the order of the images).
    Don't know, if this ist the best way to do it, but it works for me, and I understand, what I have done.
    Here is the template to my site http://malabu.de/pw:
    <?php include('./_head.php'); // include header markup ?> <div id='index'> <?php // output 'headline' if available, otherwise 'title' echo '<h1>' . $page->get('headline|title') . '</h1>'; //get all segments and clean segments! $seg1 = $sanitizer->pageName($input->urlSegment1); $seg2 = $sanitizer->pageName($input->urlSegment2); $seg3 = $sanitizer->pageName($input->urlSegment3); //check for the second urlsegment not needed if ($seg2) { // unknown URL segment, send a 404 throw new Wire404Exception(); } //check for the third urlsegment not needed if ($seg3) { // unknown URL segment, send a 404 throw new Wire404Exception(); } // Sortierung übernehmen: $order = $input->get->order; // sortiere nach name_: if ($order >0) { $images = $page->images->sort("name_".$order); $session->set($order, $order); } // ohne Sortierung: else { $images = $page->images; } //normal content without first url segment! if (!$seg1) { // output bodycopy echo $page->body; // Links zur Sortierung: echo '<p>Sortierung nach <a class="tab" href="'.$page->url.'?order=1">'. $page->get('name_1').'</a>  <a class="tab " href="'.$page->url.'?order=2">'. $page->get('name_2').'</a></p>'; // output images foreach($images as &$image) { $thumbnail = $image->height(100); echo '<div class="rahmen"><a href="'.$page->url . $image.'?order='.$session->get($order).'"><img class="shadow" src="'.$thumbnail->url.'" alt="'.$thumbnail->caption.'" title="'.$image->caption.'"></a></div>'; } } //special view output with an url segment... if ($seg1) { // get the image in the correspondent position: $index = $input->$seg1; $image = $page->images->index($index); // Link zum vorigen Bild: echo '<a href="'.$images->getPrev($images->$seg1).'?order='.$session->get($order).'"><img src="'.$config->urls->site.'templates/styles/links.gif" title="voriges Bild"></a> '; // Link zur Thumbnail-Seite: echo '<a href="'.$page->url.'?order='.$session->get($order).'"><img src="'.$config->urls->site.'templates/styles/index.gif" title="zurück zur Übersicht"></a> '; // Link zum nächsten Bild: echo '<a href="'.$images->getNext($images->$seg1).'?order='.$session->get($order).'"><img src="'.$config->urls->site.'templates/styles/rechts.gif" title="nächstes Bild"></a><br />'; // Bild zeigen: echo '<img class="shadow" src="'.$images->url . $seg1.'" alt="'.$images->$seg1->description.'" title="'.$images->$seg1->description.'">'; // Textfelder zu den Bildern anzeigen: echo '<h3>'.$images->$seg1->caption.'</h3>'; echo '<p>'. $images->$seg1->description. '<br />'.$images->$seg1->name_1.'   '.$images->$seg1->name_2.'</p>'; } ?> </div><!-- end content --> <?php include('./_foot.php'); // include footer markup ?> If anyone knows to make it better, I'd like to hear about ...
  4. biber's post in Gallery without lightbox & Co was marked as the answer   
    Because I myself hate topics that end up in nothing, I will show here, how I built my gallery. This template file works for me:
    <?php include('./_head.php'); // include header markup ?> <div id='index'> <?php // output 'headline' if available, otherwise 'title' echo '<h1>' . $page->get('headline|title') . '</h1>'; // galerie.php template file // overview - and single image view //get all segments and clean segments! $seg1 = $sanitizer->pageName($input->urlSegment1); $seg2 = $sanitizer->pageName($input->urlSegment2); $seg3 = $sanitizer->pageName($input->urlSegment3); $images = $page->images; //normal content without first url segment! if (!$seg1) { // output bodycopy echo $page->body; // output images foreach($images as &$image) { $thumbnail = $image->height(100); echo '<div class="rahmen"><a href="'.$page->url . $image.'"><img class="thumb" src="'.$thumbnail->url.'" alt="'.$thumbnail->caption.'" title="'.$image->caption.'"></a></div>'; } } //check for the second urlsegment not needed if ($seg2) { // unknown URL segment, send a 404 throw new Wire404Exception(); } //check for the third urlsegment not needed if ($seg3) { // unknown URL segment, send a 404 throw new Wire404Exception(); } //special view output with an url segment... if ($seg1) { // get the image in the correspondent position: $index = $input->$seg1; $image = $page->images->index($index); // Link zum vorigen Bild: echo '<a href="'.$images->getPrev($images->$seg1).'"><img src="'.$config->urls->site.'templates/styles/links.gif" title="voriges Bild"></a> '; // Link zur Thumbnail-Seite: echo '<a href="'.$page->url.'"><img src="'.$config->urls->site.'templates/styles/index.gif" title="zurück zur Übersicht"></a> '; // Link zum nächsten Bild: echo '<a href="'.$images->getNext($images->$seg1).'"><img src="'.$config->urls->site.'templates/styles/rechts.gif" title="nächstes Bild"></a><br />'; // Bild zeigen: echo '<img src="'.$image->url . $seg1.'" alt="'.$images->$seg1->description.'" title="'.$images->$seg1->description.'">'; // Textfelder zu den Bildern anzeigen: echo '<h3>'.$images->$seg1->caption.'</h3>'; echo '<p>'. $images->$seg1->description. '<br />' .$images->$seg1->name_1.'<br />' .$images->$seg1->name_2.'</p>'; } ?> </div><!-- end content --> <?php include('./_foot.php'); // include footer markup ?> With many thanks to mr-fan, who very patiently introduced me to the basics of ProcessWire and PHP.
    Günter
×
×
  • Create New...