static page plugin

Creating and modifying plugins.
gwilsonmail
Regular
Posts: 146
Joined: Tue Jul 12, 2005 9:12 pm
Location: Ottawa, Canada
Contact:

Post by gwilsonmail »

go to the admin page and look for "static pages" on the left menu
gw
Col. Kurtz
Regular
Posts: 450
Joined: Thu May 26, 2005 10:43 am
Location: Bonn, Germany
Contact:

Post by Col. Kurtz »

garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Staticpages are saved in the database, not in the filesystem. :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Dinges
Regular
Posts: 14
Joined: Fri Aug 12, 2005 3:33 pm

Post by Dinges »

Is there a simple way to get all the staticpages to show a template file (to show up in my menu?), just like the categorytabs plugin does?

And what about if I would like a setup like this on my staticpage, what should I do?

Introductory text
---
Latest Post in category x
---
Older Posts in category x (4)
---
Latest Post in category y
---
Older Posts in category y (4)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

There is a sidebar plugin to the staticpages which shows the pages on the sidebar. You can adapt the plugin to display on top of your template, just like the categorytabs-suggestion is done...
And what about if I would like a setup like this on my staticpage, what should I do?
For that you should best create your own plugin and use the s9y functions or access the database directly to print those contents...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
robert
Regular
Posts: 1063
Joined: Mon May 09, 2005 9:17 pm
Location: Vienna, Austria
Contact:

Post by robert »

With the newest Upgrade of the plugin i got a default:

when I open an existing page in the editor I cann´t edit it. I have to switch to HTML view and then switch again. When I did this, editing in WYSIWYG mode is possible.
Von 2005 bis 2020 nutzte ich Serendipity/S9y. Auch nach meinem Umstieg bin ich S9y weiterhin in Gedanken verbunden. Ein Dank ergeht an alle Forumsteilnehmer:innen, die mir hier weitergeholfen haben.

Nur ein Blog
Guest

Post by Guest »

this plug isn't work for me :( Could someone describe me what to do ? I see it in my plugins but when I configure it i not appear in home page.


BTW sorry for my english, I'm from Poland ;]
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Guest: After you have installed the static page event plugin, you have a new menu item in your admin menu "Static Pages". There you can create the pages.

Then also install the static page sidebar plugin, this offers links to your pages on your home page. :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
meln
Posts: 3
Joined: Sat Sep 09, 2006 5:19 am

language problem

Post by meln »

hi,
i have a problem about static page plugin. everything is ok but the page is written in turkish and when i access it it is like that :

ǯk fazla tak?m asl?akk???sem yalan olur.
but it must seen like that :
Çok fazla takılmadım aslında hakkında bölümüne desem yalan olur.


(i made a file newpage.tpl and use it.)

how can i fix this ? in the configuration and when i add a new static page i choose turkish. but it is still like that.

Thanks...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: language problem

Post by garvinhicking »

Hi!

Do you use UTF-8 as the character set of your blog? Which staticpage plugin are you using? Could you make a screenshot of the page where the from string occurs? It is caused by using ISO instead of UTF-8, or vice versa...

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Dinges wrote: And what about if I would like a setup like this on my staticpage, what should I do?

Introductory text
---
Latest Post in category x
---
Older Posts in category x (4)
---
Latest Post in category y
---
Older Posts in category y (4)
It is very easy (If one knows how ;-)):

in the static-page.tpl

Code: Select all

{serendipity_fetchPrintEntries category=the-category-id template="static-entries.tpl" limit=4 noSticky="true"}
more about this function and the options you need: http://www.s9y.org/78.html#A2

And then you make a new tpl, e.g. static-entries.tpl and make the format of what should be shown in the static page - just like the normal entry format:

e.g.

Code: Select all

<!-- ENTRIES START -->

{if $entries}
news:

<ul>
    {foreach from=$entries item="dategroup"}
            {foreach from=$dategroup.entries item="entry"}
			<li>
			<div>
        		({$dategroup.date|date_format:"%d.%m.%Y"}) <a href="{$entry.link}">{$entry.title|@default:$entry.id}</a>
			</div>
            <div>
                {$entry.body}
            </div>
			</li>
            {/foreach}
   {/foreach}
</ul>

{/if}
<!-- ENTRIES END -->
Last edited by stm999999999 on Sun Sep 10, 2006 3:53 pm, edited 1 time in total.
Ciao, Stephan
meln
Posts: 3
Joined: Sat Sep 09, 2006 5:19 am

Re: language problem

Post by meln »

garvinhicking wrote:Hi!

Do you use UTF-8 as the character set of your blog? Which staticpage plugin are you using? Could you make a screenshot of the page where the from string occurs? It is caused by using ISO instead of UTF-8, or vice versa...

HTH,
Garvin
yes i use UTF-8. except static page everything works well. i use version 3.36.

the tpl file code :

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" />
<title>Hakkinda</title>
</head>

<body>
<p>Çok fazla takılmadım aslında hakkında bölümüne desem   yalan olur. Herşeyi koyarım yaparım dedim fakat birden tak etti kafama. "Lan ne   yazıcam ki ben şimdi bu hakkında bölümüne ??????" diye kaç kez kendi kendime   konuştum. Ablama falan sordum. Bir de Hüseyin'e. Yok pek uzun süren bir konuşma   yapmadık bu konu hakkında zaten de. Kaldı öyle. <br />
    <br />
  CV yazacak halim yok ki   daha. Iıııı... Microsoft Office programlarının hepsine hakim. Web sitesi yapımı   konusunda iyi kötü deneyimli. 3 dil bilirim. İngilizce iyi. Almanca orta.   İspanyolca eh işte. İtalyanca'ya başlıyorum falan diye. Garip olur. <br />
  <br />
  Ya   da daha spesifik bir bölüm. Boğa burcu. Siyah saçlı. Kahverengi gözlü (hatta   güneş vurursa bazen yeşile mi elaya mı ne kayıyor da yani) 1.82-1.83 boylarında.   Kilo 75'e doğru yaklaşıyor. Karnıbahar yemeği harici diğer yemekler ile aramda   sorun yoktur. Arabesk de dahil kulağıma hoş gelen her türlü müziği dinlerim.   Kafama vurulmasından hoşlanmam. Bak bu da olmadı. </p>
<p>Bir kez daha deneyeyim.</p>
<p>12 Mayıs 1985'de Matematik öğretmeni bir babanın 2.   çocuğu olarak Gönen/Balıkesir'de dünyaya gelmişim. İlkokulu Gönen Şehit Rahmi   İlkokulu'nda. Orta ve liseyi Gönen Anadolu Lisesi'nde okuduktan sonra ÖSS'de   fena bir başarı göstermeyerek 351.xxx puan alıp 2003 yılında İstanbul Teknik   Üniversitesi Gıda Mühendisliği bölümüne girmeyi hak kazandım. Şimdilerde ise boş   beleş olarak takılmaktayım. Okumak diye bir çabam var. Fakat yoklama diye   önümüze çıkartılan zımbırtıdan hoşlanmasam da benim gibiler için mutlak olması   gerektiğini bilirim. Kişisel ataletimi yenmem konusunda sorunlar yaşıyorum.   Devlet Baba'dan yardım istiyorum. Nerde bu devlet yaw !!! Bu da mı olmadı ?   Tahmin etmiştim.</p>
<p>Neyse artık ne yapacağız bir şekilde burasını   doldurmak gerekir. Zira o kadar kahve fincanı temalı buton koyduk oraya.   Yaptığım işlerle anılmak istiyorum doğru da yine de böyle yazmak da gerekir diye   düşündüm. Yanlış da düşünmüş olabilirim. Çok da değil aslında   istediklerim.<br />
  -  "Yaz ulan yaz !" <br />
  - "Yazmıyorum lan sanane !"<br />
  <br />
  Günü   de belirteyim bari de tam olsun. Bakarsın ileride de eklerim birşeyler. <br />
  <br />
  Bu yazıyı 01.09.2006 saat 16 sularında yazdım. Su soğuktu üşüdüm. Malum   eylül'e girdik artık. (Ben yazmıyayım dedim. Heh gördün mü bak böle de salak   saçma bir kapanış yapmış oldum. Kusanların mağduriyetleri   karşılanacaktır.)</p>
<p>Sevgi saygı falan filan...</p>
<p>meln</p>
</body>
</html>
screenshot of the page view

Image[/b]
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: language problem

Post by garvinhicking »

Hi!

Check the content-type meta thing in your staticapge .tpl file! It must also be set to UTF-8! Also you need to save the file in UTF-8 format, not ISO.

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
meln
Posts: 3
Joined: Sat Sep 09, 2006 5:19 am

Re: language problem

Post by meln »

garvinhicking wrote:Hi!

Check the content-type meta thing in your staticapge .tpl file! It must also be set to UTF-8! Also you need to save the file in UTF-8 format, not ISO.

HTH,
Garvin
10x i will try. i'll report the result.
Guschtel
Posts: 2
Joined: Mon Sep 18, 2006 5:16 pm

Patch for the staticpage plugin (CSS-Style for Links)

Post by Guschtel »

Hi,

with the following Code (patch) its possible to style the Links from the staticpage plugin.
I just inserted

Code: Select all

class="staticpage-level-X"
into all of the Links in the HTML-Output.

Code: Select all

117c117
<                 $str .= '<a href="' . $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'].'" class="staticpage-level-0">'.PLUGIN_STATICPAGELIST_FRONTPAGE_LINKNAME . '</a><br />';
---
>                 $str .= '<a href="' . $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'].'">'.PLUGIN_STATICPAGELIST_FRONTPAGE_LINKNAME . '</a><br />';
233c233
<                             "<a href=\"%s\" title=\"%s\" class=\"staticpage-level-%d\" style=\"padding-left: %dpx;\">%s</a><br />\n",
---
>                             "<a href=\"%s\" title=\"%s\" style=\"padding-left: %dpx;\">%s</a><br />\n",
236d235
<                             $page['depth'],

You then have the possibility to use css like this:

Code: Select all

.container_serendipity_plugin_staticpage a.staticpage-level-0 {
    display: block;
    margin-left: 5px;
    margin-top: 5px;
}
.container_serendipity_plugin_staticpage a.staticpage-level-1 {
    display: block;
    margin-left: 10px;
}
.container_serendipity_plugin_staticpage br {
    display: none;
}
.container_serendipity_plugin_staticpage a.staticpage-level-2 {
    display: none;
}
to get a nicely styled List of Links up to Level 2.
Post Reply