Templating Terrors

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
Tsurotu
Regular
Posts: 14
Joined: Wed Apr 20, 2005 5:58 pm
Location: Behind you.

Templating Terrors

Post by Tsurotu »

Well, I got the software, whacked it up to our server, imported my blogger blog (with a little tricky hacking) and it all went peachy.

Now unfortunately im a perfectionist and if it isnt unique, hell, it aint mine baby.

Anyhoo, what i want to do is remove the Top border on a single plugin, and ive searched and searched and used every attempt but alas...

I cant remove it

I want to remove the calendar border (the top separating one) but none of the others, i happen to be quite 'in' with CSS, but not with smarty, and i couldnt figure it out.

I tried applying css to the

Code: Select all

    <div class="serendipitySideBarItem container_serendipity_calendar_plugin">
div, with this CSS:

Code: Select all

.serendipitySideBarItem container_serendipity_calendar_plugin{
border-top:none;
}
and... nothing...

a nice fat border is still there.

So i thought that it might be being overridden by the cascade (of the style sheets) and popped the code at the bottom, still no luck

So i put it down to my markup...

what have i dont wrong guys?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Templating Terrors

Post by garvinhicking »

Use this CSS:

Code: Select all

.container_serendipity_calendar_plugin{
border-top:0px !important;
}
instead.

The .container... stuff is not INSIDE the div as you tried in your CSS code, but is parellel. Thus you need to adress it without the parallel div, it's not needed to use the serendipitySidebarItem reference.

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/
Tsurotu
Regular
Posts: 14
Joined: Wed Apr 20, 2005 5:58 pm
Location: Behind you.

Post by Tsurotu »

wunderbar,

vielen dank Garvin

(bah, english Keyboard, keinen umlauts und mein schlechtes vokab)

Anyway, it works.

and when im finished it might just be worthy of posting on the showcase forum...

8)

oh and for future efforts, the spelling is 'parallel', if you could return the favour and correct my german, i will be most grateful :wink:
Tsurotu
Regular
Posts: 14
Joined: Wed Apr 20, 2005 5:58 pm
Location: Behind you.

Post by Tsurotu »

ACH!

I have more problems.

Infact many, but only a couple pertaining to the skinning of my blog.

I might have broken my RSS feeds.

I dont know how, but they jsut done seem to work, when I tested them on Firefox they just didnt work; they say "Live bookmark Loading"...

So I clicked on the URLs to the feeds, all that resides within is:

Code: Select all

<html><body></body></html>
Infact I played with the directory and it seems that there is no such 'feed' simply on demand (am i right?) pseudo-feeds... perhaps made by a php file?

However they dont seem to be working.

I cant think of what i have done to jeopardize them, I can give a URL if needed.

The templates still a mess, so i will work on it and post it if needs be. hopefully it will be a clean solution.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Tsurotu, yes a URL would be needed.

Usually the URLs like feeds/index.rss are just rewritten to rss.php file - you need that one in your core directory. Maybe just try to call it directly, and/or check if your mod_rewrite/apache errorhandling may have some errors so that it doesn't work?

But I can say more about this as soon as I have your URL :)

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/
Tsurotu
Regular
Posts: 14
Joined: Wed Apr 20, 2005 5:58 pm
Location: Behind you.

Post by Tsurotu »

You are lucky Garvin, just this minute managed to put the template back together...

Every post is a blogger import though, but i am posting now as a test post incase the import neglected the feed.

http://www.screen-burn.neuropirate.com/serendipity/

*edit, posted with no avail

I have all attempts at remedying,

an html nugget with the feeds

the feed plugin

and the category feed plugin
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Here, check this URL:

http://www.screen-burn.neuropirate.com/ ... ersion=2.0

There you can see the error you made (whitespace in plugin_internal.inc.php)

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/
Tsurotu
Regular
Posts: 14
Joined: Wed Apr 20, 2005 5:58 pm
Location: Behind you.

Post by Tsurotu »

The 'headers already sent by...' error?

i couldnt seee where i made any errors with whitespace, but it 'went away' when i put an

Code: Select all


ob_start(); 
at the start of rss.php...

now the error on the rss is:

Code: Select all

XML Parsing Error: xml processing instruction not at start of external entity
Location: http://www.screen-burn.neuropirate.com/serendipity/rss.php?version=2.0
Line Number 6, Column 1:
in which case I don't know what to do... I assume that its telling me that the processing instruction must be at the top of the rss.php file (assumption) but why? and i cant make the damned header error go away.

I shall fiddle again, i will keep you posted.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

The error is still the same: You introduced whitespaces somewhere. :)

The ob_start() just removes the PHP warning, but the whitespaces remain and render your XML useless. The first line of a XML file may not be a whitespace line.

Edit your include/plugins_internal.inc.php at the place the PHP error message indicated, there you should see the beginning of the output which is not allowed.

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/
Tsurotu
Regular
Posts: 14
Joined: Wed Apr 20, 2005 5:58 pm
Location: Behind you.

Post by Tsurotu »

Im afraid I dont see it...

The only change to the plugin php file was to remove the calendar title, however i replaced it with 'hello' (as you can see from the link).

However the problem remains, and when exporting to an external text editor the line number; 52, reports as the server time offset. I had recently changed it to '+5' which it needs, the server being in america, me being in uk.

However i changed it back to the default; 0, and the error still remains.

this is what the first 60ish lines of plugin_internal.inc.php look like:

Code: Select all


<?php # $Id: plugin_internal.inc.php,v 1.29 2005/04/07 13:11:03 garvinhicking Exp $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved.  See LICENSE file for licensing details

class serendipity_calendar_plugin extends serendipity_plugin {
    var $title = 'hello';

    function introspect(&$propbag)
    {
        $propbag->add('name',        CALENDAR);
        $propbag->add('description', QUICKJUMP_CALENDAR);
        $propbag->add('configuration', array('beginningOfWeek'));
        $propbag->add('stackable',     false);
        $propbag->add('author',        'Serendipity Team');
        $propbag->add('version',       '1.0');
    }

    function introspect_config_item($name, &$propbag)
    {
        switch($name) {
            case 'beginningOfWeek':
                $options = array();
                for ( $i = 1; $i <= 7; $i++ ) {
                    $options[] = serendipity_formatTime('%A', mktime(0,0,0,3,$i-1,2004));
                }

                $propbag->add('type',        'select');
                $propbag->add('select_values', $options);
                $propbag->add('name',        CALENDAR_BEGINNING_OF_WEEK);
                $propbag->add('description', CALENDAR_BOW_DESC);
                $propbag->add('default',     1);
                break;

            default:
                return false;
        }
        return true;
    }

    function generate_content(&$title)
    {
        global $serendipity;

        $title = $this->title;

        // Usage of serendipity_serverOffsetHour is as follow:
        // * Whenever a date to display needs to be set, apply the timezone offset
        // * Whenever we USE the date anywhere in the database, subtract the timezone offset
        // * Whenever we DISPLAY the date, we do not apply additional timezone addition to it.
        if (!isset($serendipity['GET']['calendarZoom'])) {
            if (!isset($serendipity['range'])) {
                $serendipity['GET']['calendarZoom'] = serendipity_serverOffsetHour(time());
            } else {
                $serendipity['GET']['calendarZoom'] = serendipity_serverOffsetHour($serendipity['range'][0]);
            }
        }


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

Post by garvinhicking »

There it is, the whitespace are exactly at the top of that file. No whitespaces BEFORE <?php and AFTER ?> allowed. Check that your FTP/Editor does not introduce blank spaces. :)

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/
Tsurotu
Regular
Posts: 14
Joined: Wed Apr 20, 2005 5:58 pm
Location: Behind you.

Post by Tsurotu »

duhhh silly me...

sigh...

cpanelX editing, always adds a line break after the last line...

im so sorry for wasting your time on such a silly thing...

bah....
Post Reply