Wichtige Links:

» moziloCMS
» moziloGB
» mozilo-Layoutarchiv
» mozilo-Pluginarchiv
» NEU: mozilo-Entwicklerportal
Unterstütze mozilo mit einer Spende!
Aktuelle Zeit: 06.09.2010, 15:42

Alle Zeiten sind UTC + 1 Stunde [ Sommerzeit ]




Ein neues Thema erstellen Auf das Thema antworten  [ 10 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: Inclusion of galleries
BeitragVerfasst: 07.08.2009, 11:48 
Offline

Registriert: 07.08.2009, 11:43
Beiträge: 5
Realer Name: Rob
Hi there.

Excellent bit of software; nice and clean and simple to use. I've used it for a couple of sites now, and even my not very technical younger sister can use it!

One question though. I would like to have a gallery available as a content page, so visible in the indexes. I cannot see how to do this; all I have been able to do is link to it from an existing content page. Is it possible to include galleries in the index, or is it possible to include them within a content page, as you can do with other content pages?

Thanks,

Rob


Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Inclusion of galleries
BeitragVerfasst: 11.08.2009, 14:09 
Offline
mozilo-Mastermind
Benutzeravatar

Registriert: 20.03.2009, 18:33
Beiträge: 1755
Realer Name: Arvid Zimmermann
Hi Rob, welcome to the support board :)

Inclusion of galleries in the way you mean it isn't possible yet; it will be one of the features of the upcoming version 1.12.
For now, you could include galleries via iFrame:
Code:
<iframe src="gallery.php?gal=YourGallery" height="800" width="720" style="border:0px;overflow:auto;" frameborder="0">
   Your browser doesn't support iFrames.<br />
   <a href="gallery.php?gal=YourGallery" target="_blank">Please click here to see the gallery.</a>
</iframe>
(Adjust the width/height values to your needs.)

_________________
.:: mozilo - Wir machen Websites einfach. ::.

Erste Hilfe: HTML-Referenz - CSS-Referenz - PHP-Referenz
+++ Adoptiere auch du einen Thread mit 0 Antworten! +++



Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Inclusion of galleries
BeitragVerfasst: 11.02.2010, 13:49 
Offline

Registriert: 07.08.2009, 11:43
Beiträge: 5
Realer Name: Rob
Thanks.

After some experimentation, and mainly because the images I was including were not natively in a standard format (so needed converting anyway) I decided to write my own gallery display routines.

Initially I was including this with an iframe, as suggested:
Code:
[html|<script type="text/javascript" src="/galleries/autoHeight.js"></script>]
[html|<iframe name="test" class="autoHeight" frameborder=0 allowtransparency="true" width=500 height=100 scrolling="auto" src="/galleries/vl.php?gal=prestel_mailbox&layout=0&cols=3"><a href="/galleries/vl.php?gal=prestel_mailbox&layout=0&cols=4">Click here for the gallery</a></iframe>]
(autoHeight.js is a routine to automatically adjust the iframe height!)

But was having trouble getting a consistent look-and-feel, because the css wasn't carrying through to the iframe, being a separate entity as far as the browser is concerned, and I just couldn't get the css to work..

In the end I made some edits to Syntax.php :

Immediately after
Code:
            elseif ($attribute == "include") {

add:
Code:
            if (substr($value,0,7) == "http://") { //Rob20100211
                $pagecontent = file_get_contents($value);
               if (strlen($pagecontent)>0) {
                  $pagecontent = preg_replace('/(\r\n|\r|\n)/', '{newline_in_include_tag}', $pagecontent);
                   $content = str_replace ($match,$pagecontent, $content);
               } else {
               $content = str_replace ($match, "<span class=\"deadlink\"".$this->getTitleAttribute($this->LANG->getLanguageValue0("tooltip_include_recursion_error_0")).">$value</span>", $content);
               }
            } else {            
(I should probably have added a new error message!)

and add a single } later on just before
Code:
            // Farbige Elemente


Now, the [include] parameter will also accept, e.g.:
Code:
[include|http://your.website/rob/gallery.php?foo=bar]


This worked for me, as the included page is now served up as part of the original page, so inherits all it's css, etc. Don't include any <head> or <body> html tags in your included webpage - launch straight into the code you want included.

I just need to add that to the search routines now ...!

HTH.

Rob


Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Inclusion of galleries
BeitragVerfasst: 11.02.2010, 13:59 
Offline
mozilo-Mastermind
Benutzeravatar

Registriert: 20.03.2009, 18:33
Beiträge: 1755
Realer Name: Arvid Zimmermann
Impressive, great idea! I think you'll like the upcoming version 1.12, which can be extended with own plugins. Your "real include" may be just predestinated to be such a plugin :)

Unfortunately, it won't work on servers with allow_url_fopen = off - which makes it hard to add your solution to the standard. Especially free hosters tend to configure their PHP environment quite strictly...

_________________
.:: mozilo - Wir machen Websites einfach. ::.

Erste Hilfe: HTML-Referenz - CSS-Referenz - PHP-Referenz
+++ Adoptiere auch du einen Thread mit 0 Antworten! +++



Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Inclusion of galleries
BeitragVerfasst: 11.02.2010, 18:28 
Offline

Registriert: 07.08.2009, 11:43
Beiträge: 5
Realer Name: Rob
azett hat geschrieben:
Impressive, great idea! I think you'll like the upcoming version 1.12, which can be extended with own plugins. Your "real include" may be just predestinated to be such a plugin :)

Thank you!

Zitat:
Unfortunately, it won't work on servers with allow_url_fopen = off - which makes it hard to add your solution to the standard. Especially free hosters tend to configure their PHP environment quite strictly...

Indeed... maybe make it a configurable option? Better than having it there, commented out like [php] as I didn't know about that until I started delving into the code to try and add stuff!

btw... slight modification.. add this line
Code:
                $value = preg_replace("/&amp;/Umsi", "&", $value);
just before the file_get_contents line - helps with URLs with multiple parameters!


Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Inclusion of galleries
BeitragVerfasst: 11.02.2010, 18:35 
Offline
mozilo-Mastermind
Benutzeravatar

Registriert: 20.03.2009, 18:33
Beiträge: 1755
Realer Name: Arvid Zimmermann
irrelevant hat geschrieben:
Indeed... maybe make it a configurable option? Better than having it there, commented out like [php] as I didn't know about that until I started delving into the code to try and add stuff!
Hmmm, that's one good thought...we could check for the allow_url_fopen status - and if it's "on", we just allow external includes. If not, then [include] just behaves like now. I will check that, especially concerning security aspects.

irrelevant hat geschrieben:
btw... slight modification.. add this line
Code:
                $value = preg_replace("/&amp;/Umsi", "&", $value);
just before the file_get_contents line - helps with URLs with multiple parameters!
Thx :)

_________________
.:: mozilo - Wir machen Websites einfach. ::.

Erste Hilfe: HTML-Referenz - CSS-Referenz - PHP-Referenz
+++ Adoptiere auch du einen Thread mit 0 Antworten! +++



Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Inclusion of galleries
BeitragVerfasst: 12.02.2010, 21:02 
Offline

Registriert: 07.08.2009, 11:43
Beiträge: 5
Realer Name: Rob
Another little mod.

Within Index.php

after
Code:
    elseif ($USE_CMS_SYNTAX) {
       $pagecontentarray = getContent();
add
Code:
//Rob20100212 pass entier query string to paramter.
//designed for passing to [include|http.. pages.
      $qs=$_SERVER['QUERY_STRING'];

       $pagecontentarray[0] = preg_replace('/{QUERY_STRING}/', $qs, $pagecontentarray[0]);


This allows the aforementioned [include] to be used like:
[include|http://yourwebsite/script.php?foo=bar&bar=foo&{QUERY_STRING}]

This passes the original query string to the included page. This allows self-referencing links to be constructed.

See, e.g.
http://www.viewdata.org.uk/index.php?ca ... ge=90_test

the first/next etc links are constructed by the included page.


Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Inclusion of galleries
BeitragVerfasst: 13.02.2010, 15:50 
Offline
mozilo-Mastermind
Benutzeravatar

Registriert: 20.03.2009, 18:33
Beiträge: 1755
Realer Name: Arvid Zimmermann
Thought about the whole thing carefully - this should all be a plugin. Just to be sure the standard works on every server as defined, I decided not to extend the standard include tag - but still your work is great and should (from 1.12 on) be available as plugin under all circumstances!

_________________
.:: mozilo - Wir machen Websites einfach. ::.

Erste Hilfe: HTML-Referenz - CSS-Referenz - PHP-Referenz
+++ Adoptiere auch du einen Thread mit 0 Antworten! +++



Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Inclusion of galleries
BeitragVerfasst: 13.02.2010, 18:34 
Offline

Registriert: 07.08.2009, 11:43
Beiträge: 5
Realer Name: Rob
I'll look forward to 1.12 !

I try and keep such modifications to an absolute minimum - it makes upgrading a system a pain when there are too many changes to carry over.

Rob


Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Inclusion of galleries
BeitragVerfasst: 13.02.2010, 18:35 
Offline
mozilo-Mastermind
Benutzeravatar

Registriert: 20.03.2009, 18:33
Beiträge: 1755
Realer Name: Arvid Zimmermann
This is the very reason for the upcoming plugin interface ;)

_________________
.:: mozilo - Wir machen Websites einfach. ::.

Erste Hilfe: HTML-Referenz - CSS-Referenz - PHP-Referenz
+++ Adoptiere auch du einen Thread mit 0 Antworten! +++



Nach oben
 Profil  
 
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 10 Beiträge ] 

Alle Zeiten sind UTC + 1 Stunde [ Sommerzeit ]


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
.:: Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group :: Deutsche Übersetzung durch phpBB.de :: Impressum ::.