Page 1 of 3
New to serendipity - Static pages question
Posted: Sat Jul 26, 2008 3:34 am
by JokerHill
How does one work with static pages in s9y?I don't quite understand the interface and what its asking for. I create a new static page but then what, how do I use it and where do I find the page?
Thanks!
Posted: Sat Jul 26, 2008 4:08 am
by JokerHill
I've been attempting to add media to my blog library but am having no luck. Here is what I'm getting:
Adding image...
Warning: move_uploaded_file(/home2/tohealor/public_html/serendipity/uploads/swirlaworld.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home2/tohealor/public_html/serendipity/include/admin/images.inc.php on line 299
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/var/tmp/php6YeMmY' to '/home2/tohealor/public_html/serendipity/uploads/swirlaworld.jpg' in /home2/tohealor/public_html/serendipity/include/admin/images.inc.php on line 299
Unknown error occurred, file not uploaded. Maybe your filesize is larger than the maximum size allowed by your server installation. Check with your ISP or edit your php.ini file to allow larger file size uploads.
My image size here is 3.85 KB.
Any help is much appreciated!
Posted: Sat Jul 26, 2008 10:28 am
by garvinhicking
Hi!
It seems that your server provider does not give you proper paths to read your temporarily file upload loication. Please contact your provider with this error message and ask him that your PHP process needs to be able to access /var/tmp/
As for static pages:When you create a new static page in the s9y admin interface, you give it a permalink.Usually something like index.php?/pages/staticpage.html -- this is the URL you can later use to access your staticpage, like through
http://yourblog/index.php?/pages/staticpage.html
Regards,
Garvin
Posted: Sat Jul 26, 2008 9:25 pm
by JokerHill
Thanks Garvin,
I've forwarded the error messages so we'll see what happens.
Now I have to provide a link on the frontpage for access to the static page. What plugin is best for that?
I'm also having an issue installing google analytics to my page. I've attempted pasting it in the index.tpl of my template at various positions and still it doesn't connect to google. Is there somewhere else that I should be adding the code?
The code(s) are below:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-5107716-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
or Legacy tracking code
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-5107716-1";
urchinTracker();
</script>
One other thing

I can't seem to insert an amazon widget in the body of my template. No matter where I insert in the code the widget goes either to the top of the page outside the boxes, or below. Should I be encasing the widget with particular code?
Here is the widget code (I've broken it up so the width is reasonable):
<SCRIPT charset="utf-8" type="text/javascript" src="http://ws.amazon.com/widgets/q?ServiceVersion=
20070822&MarketPlace=US&
ID=V20070822/US/toheaornottoh-20/8001/ad3784be-269a-4cc0-a5ea-04bbbb60ac03"> </SCRIPT> <NOSCRIPT><A HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&
MarketPlace=US&ID=V20070822%2FUS%2Ftoheaornottoh-20
%2F8001%2Fad3784be-269a-4cc0-a5ea-04bbbb60ac03&Operation=NoScript">Amazon.com Widgets</A></NOSCRIPT>
Here's a link to my site -
http://www.toheal.org/
Thanks!
Posted: Sat Jul 26, 2008 9:39 pm
by garvinhicking
Hi!
Now I have to provide a link on the frontpage for access to the static page. What plugin is best for that?
Of course the easiest would be the "Static Page List" plugin, which comes with the static page event plugin. This one lists all of your created static pages.
If you want to only show specific links, you could install the "HTML nugget" sidebar plugin, where you can put any HTML you like.
I'm also having an issue installing google analytics to my page. I'vettempted pasting it in the index.tpl of my template at various positions and still it doesn't connect to google. Is there somewhere else that I should be adding the code?
There is a dedicated Google Analytics sserendipity plugin, have you tried that?
Of course you can paste the code manually, and that looks fine in your URL. However you should not add BOTH Analytics tracking codes, that could confuse Google. Also bear in mind that analytics takes up to 48 hours until it starts to track your site.
Plus, you have embedded your GAcode as "UA-UA- 5107716" however spaces are not allowed there, and I believe it should thus read "UA-5107716" only!
One other thing

I can't seem to insert an amazon widget in the body of my template. No matter where I insert in the code the widget goes either to the top of the page outside the boxes, or below. Should I be encasing the widget with particular code?
The best thing to add widgets is also through the use of the serendipity "HTML Nugget" plugin. Be sure to disable the WYSIWYG editor in your personal preferences of Serendipity first, because inserting Javascript is easier without the WYSIWYG editor.
Once you do that, it should show up in your sidebar and not at the bottom of your page
HTH,
Garvin
Posted: Mon Jul 28, 2008 12:28 am
by JokerHill
Wow, very thorough Garvin. I appreciate the help. I'm looking forward to playing around with the blog.
Thanks!
Posted: Mon Jul 28, 2008 3:41 am
by JokerHill
A new set of questions
When I install the 'category assignment' plugin I get this error message:
Warning: Invalid argument supplied for foreach() in /home2/tohealor/public_html/plugins/serendipity_event_assigncategories/serendipity_event_assigncategories.php on line 139
How can I fix this?
The plugin for favourite links has no options for inputs, is this normal, am I supposed to interface with it another way?
Thanks for the help,
Posted: Mon Jul 28, 2008 9:57 am
by garvinhicking
Hi!
Did you already create categories in your s9y administration ("Categories" menu item)? Without categories, the plugin might not operate fully.
The plugin for favourite links has no options for inputs, is this normal, am I supposed to interface with it another way?
You need to make sure that the event plugin "Link List" is also installed. Once it is, you get a new menu item in your s9y panel.
HTH,
Garvin
Posted: Thu Jul 31, 2008 12:52 am
by JokerHill
Thanks Garvin you've been a real help!
Though I do have some more questions
I'm using the template TerraFirma. It has buttons beside 'homepage'. I want to assign static pages and change the name of the buttons. Am I right to assume I have to change the index.tpl here :
<!-- ****** Change navbar links here ****** -->
<li><a href="#">News</a></li>
<li><a href="#">Photos</a></li>
<li><a href="#">Projects</a></li>
<li><a href="#">Music</a></li>
<li><a href="#">Contact</a></li>
If so, what is the best way to enter the url to my static page. Where do I place the url?
http://www.toheal.org/
Thanks again,
Posted: Thu Jul 31, 2008 12:05 pm
by garvinhicking
Hi!
Exactly, you have to modify the index.tpl there.
If so, what is the best way to enter the url to my static page. Where do I place the url?
using the full absolute URL is preferrable, like
Code: Select all
<li><a href="/pages/news.html">News</a></li>
where of course "/pages/news.html" would relate to the permalink of your staticpage that you configured.
Regards,
GArvin
Posted: Fri Aug 01, 2008 5:46 am
by JokerHill
I'm having fun absorbing the learning curve here. However there is one thing I seem stuck on, and it relates to my very first question. I save my static pages via the blog admin and regardless of the absolute url I input I receive a succesful 'save'. Though I can never actually find my static page file in any folder.
I've created a static page. I created a file for the static page in my site root folder called 'staticpages' which according to my web host file system is found at '/home2/tohealor/public_html/staticpages' - although my domain name is
www.toheal.org.
The 'public_html' folder is the site root folder.
The s9y install and its files are in the site root as well (obviously), so what absolute url am I to enter so that my static page is accessible?
I've tried everything under the sun such as:
I don't know what to enter!
I'm at my wits end trying to figure out the naming system
Any suggestions?
Thanks for taking the time.
Posted: Fri Aug 01, 2008 10:00 am
by garvinhicking
Hi!
Staticpages are only called "static page" before they refer to a term where some specific HTML content is shown in your blog. It does not really refer to "static FILE" -- the content is always saved and read frmo the Database. No HTML file is created, it is served dynamically from the database.
So, if you create a staticpage and enter the permalink "/pages/mypage.html" you can call the file through
http://toheal.org/pages/mypage.html".
You might also simply want to install the "STatic Page List" sidebar plugin. This will list all your existing staticpages in the sidebar, with their proper links. You can then see how the links are formatted.
HTH,
Garvin
Posted: Fri Aug 01, 2008 1:24 pm
by JokerHill
Ok so I'm a bit closer now.
I inserted the following into the index.tpl:
<!-- ****** Change navbar links here ****** -->
<li><a href="/pages/pagetitle.html">News</a></li>
<li><a href="#">Photos</a></li>
<li><a href="#">Projects</a></li>
<li><a href="#">Music</a></li>
<li><a href="/pages/contactform.html">Contact</a></li>
These are the urls for the static pages, yet I get no buttons for these in the navbar. Is there another plug-in I need, or should I be changing any settings in the admin configuration page?
Thanks!
Posted: Fri Aug 01, 2008 3:44 pm
by garvinhicking
Hi!
Which template are you using? I do not see this "change navbar" output anywhere, so I assume you might be editing a wrong file...
In your current template, the nav links are inside a <div id="menu"> so you must locate those inside the index.tpl template file of, I assume /templates/terrafirma/index.tpl
Regards,
Garvin
Posted: Sat Aug 02, 2008 12:01 am
by JokerHill
I'm using the Terra Firma template. Below is the broader context and I do see that the menu is within the div id tags. Could there be a conflict with another plugin ?
<div id="menu">
<ul>
{if $head_version < 1.1}
<!-- ****** Change navbar links here ****** -->
<li><a href="/pages/pagetitle.html">News</a></li>
<li><a href="#">Photos</a></li>
<li><a href="#">Projects</a></li>
<li><a href="#">Music</a></li>
<li><a href="/pages/contactform.html">Contact</a></li>
{else}
<li class="{if $startpage}current_{/if}page_item">
<a href="{$serendipityBaseURL}">{$CONST.HOMEPAGE}</a>
</li>
{foreach from=$navlinks item="navlink"}
<li class="{if $currpage==$navlink.href}current_{/if}page_item"><a href="{$navlink.href}" title="{$navlink.title}">{$navlink.title}</a></li>
{/foreach}
{/if}
</ul>
And here is the CSS associated with the splash and menu:
#splash
{
position: absolute;
right: 30px;
background: #FFFFFF url('img/CropperCapture[12].Bmp') no-repeat;
width: 458px;
height: 92px;
}
#menu
{
position: relative;
background: #8A2509 url('CropperCapture[14].Bmp') repeat-x;
height: 53px;
padding: 0px 20px 0px 5px;
margin: 98px 0px 20px 0px;
}
#menu ul
{
}
#menu ul li
{
display: inline;
line-height: 52px;
padding-left: 3px;
}
#menu ul li.first
{
border-left: 0px;
}
#menu ul li a
{
background-color: transparent;
background-repeat: repeat-x;
padding: 8px 12px 8px 12px;
font-size: 12px;
color: #fff;
font-weight: bold;
}
#menu ul li a:hover
{
background: #fff url('img/a18.gif') repeat-x top;
color: #4A4A24;
text-decoration: none;
}