WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • One more snippet: Title & Description - for news also
  • Print
Pages: [1]   Go Down

Author Topic: One more snippet: Title & Description - for news also  (Read 10347 times)

chio

  • Guest
One more snippet: Title & Description - for news also
« on: October 28, 2007, 05:34:24 PM »
Jepp - one more:
This snippet is a replacement for almost the complete html-head section:
It creates:
Charset-Tag
Title (on postings: the posting-title)
meta-description (posting: the first ca 140 chars of short-content)
meta-keywords
<meta name="language" content="..."/>
<meta name="generator" content="CMS: WebsiteBaker; w ww.WebsiteBaker.org"/> ;-)
<meta http-equiv="imagetoolbar" content="no"/>
favicon link (WB_URL/favicon.ico - where it should be anyway)
on search-page:
<meta name="robots" content="noindex,nofollow">


It's kind of beta, but I think it works well, "thorn" help me a lot.


call: ...<head>
<?php simplepagehead(); ?>
<link rel="stylesheet" type="text/css" href=".....

for additional parameters check the readme.txt (english).
« Last Edit: July 24, 2008, 08:10:41 AM by chio »
Logged

Argos

  • Guest
Re: One more snippet: Title & Description - for news also
« Reply #1 on: July 23, 2008, 04:11:16 PM »
Thanks for this snippet! I found other useful stuff on your website as well.
Logged

chio

  • Guest
Re: One more snippet: Title & Description - for news also
« Reply #2 on: July 24, 2008, 08:09:57 AM »
Note: The newest version is here from now on:
http://WebsiteBaker.at/wb/module/simple-pagehead.html

freeSbee made some major changes, so the snippet also supports Bakery, GoCart and image Gallery
Logged

aldus

  • Guest
Re: One more snippet: Title & Description - for news also
« Reply #3 on: July 24, 2008, 11:27:02 AM »
nice - but could you/the coder insert a message/step out line after the
"modul-in-array" question [line 71] instead of going on and getting unuseable results and errors.
Code: [Select]
if(array_key_exists($module_name, $module)) {
/** some code **/
} else {
return ("Sorry - this modul [".$modul_name."]is not supported by this function.");
}
whatever - we are in the need of "error-messages" or warnings like that.

Regards
Aldus
Logged

chio

  • Guest
Re: One more snippet: Title & Description - for news also
« Reply #4 on: July 24, 2008, 02:56:19 PM »
Thanks for the hint - but there ist no need for a warning.

1.) The snippet tries to get a description from the module.
2.) If step 1 fails and $the_description is _still_ empty -> Get Page Desription.
Code: [Select]
if ($the_description == '') {
            $the_description = $wb->page_description;
        }

If a module is NOT supported the snippet does the same as the usual head-section would do.
Logged

aldus

  • Guest
Re: One more snippet: Title & Description - for news also
« Reply #5 on: July 24, 2008, 03:14:24 PM »
ok - i see it - overread it at the first - tricky
the "else" is never called.

Regards
Aldus
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • One more snippet: Title & Description - for news also
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2