Neuigkeiten:

moziloCMS verwendet Cookies. Wenn Sie auf unserer Seite weitersurfen, stimmen Sie der Cookie-Nutzung zu Datenschutzerklärung
moziloCMS Layouts
moziloCMS Plugins

Hauptmenü
-Menü

Beiträge anzeigen

Dieser Abschnitt erlaubt es dir, alle Beiträge anzusehen, die von diesem Mitglied geschrieben wurden. Beachte, dass du nur Beiträge sehen kannst, die in Teilen des Forums geschrieben wurden, auf die du aktuell Zugriff hast.

Beiträge anzeigen-Menü

Beiträge - irrelevant

#1
In English, please! / Canonical Links
11. Januar 2011, 21:54:25
regarding http://googlewebmastercentral.blogspot. ... nical.html

Mods to 1.11.2 to support this:

In index.php
within    function readTemplate() {
after global $CAT_REQUEST;add global $PAGE_REQUEST;
after    $HTML = preg_replace('/{LAYOUT_DIR}/', $LAYOUT_DIR, $HTML);add $restp = "?cat=" . $CAT_REQUEST . "&page=" . $PAGE_REQUEST;
$HTML = preg_replace('/{CANONICAL_LINK}/', $_SERVER['PHP_SELF'] . $restp, $HTML);

If you use custom parameters in the URL, as I do, and need to include these, you can add something like this between those two lines: foreach ($_GET as $key => $value) {
if (stripos("zoom|goto", $key) !== FALSE) {
$restp .= "&" . $key . "=" . $value;
}
}
where zoom|goto is a list of tags that also need to be included.  Or, just specify them all with suitable defaults if they are not already defined - it depends what you are up to!

You will also need to adjust your template.html file for whatever layouts you use.  Just add    <link rel="canonical" href="{CANONICAL_LINK}" />in the header, under any other <link> tags in there.


This ensures that your pages only appear once in Google search results, and all popularity scores etc are amalgamated across the various forms that the url can take, e.g.:

http://www.example.com/
http://www.example.com/index.php
http://www.example.com/index.php?cat=10_Hello
http://www.example.com/index.php?cat=10 ... 10_Welcome

are all treated as the same page.

HTH.
Rob.
#2
In English, please! / Re: Inclusion of galleries
13. Februar 2010, 17:34:45
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
#3
In English, please! / Re: Inclusion of galleries
12. Februar 2010, 20:02:59
Another little mod.

Within Index.php

after    elseif ($USE_CMS_SYNTAX) {
    $pagecontentarray = getContent();
add//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.
#4
In English, please! / Re: Inclusion of galleries
11. Februar 2010, 17:28:20
Zitat von: "azett"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!

ZitatUnfortunately, 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    $value = preg_replace("/&amp;/Umsi", "&", $value);just before the file_get_contents line - helps with URLs with multiple parameters!
#5
In English, please! / Re: Inclusion of galleries
11. Februar 2010, 12:49:54
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:[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            elseif ($attribute == "include") {add: if (substr($value,0,7) == "http://") { //Rob20100211
   $pagecontent = file_get_contents($value);
if (strlen($pagecontent)>0) {
$pagecontent = preg_replace('/(rn|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            // Farbige Elemente
Now, the [include] parameter will also accept, e.g.:[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
#6
In English, please! / Inclusion of galleries
07. August 2009, 11:48:53
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