How do i Change somthing?

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
adamswbrown
Regular
Posts: 15
Joined: Tue Mar 07, 2006 10:55 am

How do i Change somthing?

Post by adamswbrown » Tue Mar 07, 2006 10:57 am

I would like to change the text for "Sticky Postings" to "Important News". How do i do this. My site is www.adambrowndesigns.co.uk. How? Im using the Earphone theme.

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

Re: How do i Change somthing?

Post by garvinhicking » Tue Mar 07, 2006 12:54 pm

You can do that by editing your entries.tpl file of your current template. If your template does not have that file, copy it over from the "default" directory.

Within that file, search for

Code: Select all

{$CONST.STICKY_POSTINGS}


and change it to:

Code: Select all

Important News


Best 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/

adamswbrown
Regular
Posts: 15
Joined: Tue Mar 07, 2006 10:55 am

Post by adamswbrown » Tue Mar 07, 2006 12:56 pm

Where do i put the entries.tpl file?

Thank you very much Gavin

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

Post by garvinhicking » Tue Mar 07, 2006 1:03 pm

Just copy the 'entries.tpl' file from templates/default/entries.tpl to the direcory of the template you are using. Like templates/earphone/ - I don't know the name of the earphone template by heart, but it must sound something like that.

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/

adamswbrown
Regular
Posts: 15
Joined: Tue Mar 07, 2006 10:55 am

Post by adamswbrown » Tue Mar 07, 2006 1:03 pm

Thanks gavin. much apreiccated

adamswbrown
Regular
Posts: 15
Joined: Tue Mar 07, 2006 10:55 am

Post by adamswbrown » Tue Mar 07, 2006 1:07 pm

How would i change the look of a sticky posting? For example i would like to remove the comment links at the bottom of the stiky posting.

On a side note - how do install plugins, ive added them to the plugins directory on my websever (from the tgz file) and they dont appear)

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

Post by garvinhicking » Tue Mar 07, 2006 1:23 pm

Hi!

You could do that also with Smarty markup.

Like you could change this block:

Code: Select all

            <div class='serendipity_entryFooter'>
                {$CONST.POSTED_BY} <a href="{$entry.link_author}">{$entry.author}</a>
                {if $entry.categories}
                   {$CONST.IN} {foreach from=$entry.categories item="entry_category" name="categories"}<a href="{$entry_category.category_link}">{$entry_category.category_name|@escape}</a>{if not $smarty.foreach.categories.last}, {/if}{/foreach}
                {/if}

                {if $dategroup.is_sticky}
                    {$CONST.ON}
                {else}
                    {$CONST.AT}
                {/if} <a href="{$entry.link}">{if $dategroup.is_sticky}{$entry.timestamp|@formatTime:DATE_FORMAT_ENTRY} {/if}{$entry.timestamp|@formatTime:'%H:%M'}</a>

                {if $entry.has_comments}
                    {if $use_popups}
                        | <a href="{$entry.link_popup_comments}" onclick="window.open(this.href, 'comments', 'width=480,height=480,scrollbars=yes'); return false;">{$entry.label_comments} ({$entry.comments})</a>
                    {else}
                        | <a href="{$entry.link}#comments">{$entry.label_comments} ({$entry.comments})</a>
                    {/if}
                {/if}

                {if $entry.has_trackbacks}
                    {if $use_popups}
                        | <a href="{$entry.link_popup_trackbacks}" onclick="window.open(this.href, 'comments', 'width=480,height=480,scrollbars=yes'); return false;">{$entry.label_trackbacks} ({$entry.trackbacks})</a>
                    {else}
                        | <a href="{$entry.link}#trackbacks">{$entry.label_trackbacks} ({$entry.trackbacks})</a>
                    {/if}
                {/if}

                {if $entry.is_entry_owner and not $is_preview}
                        | <a href="{$entry.link_edit}">{$CONST.EDIT_ENTRY}</a>
                {/if}

                {$entry.add_footer}
            </div>


into this:

Code: Select all

{if $dategroup.is_sticky}
<!-- FOOTER OMITTED -->
{else}
            <div class='serendipity_entryFooter'>
                {$CONST.POSTED_BY} <a href="{$entry.link_author}">{$entry.author}</a>
                {if $entry.categories}
                   {$CONST.IN} {foreach from=$entry.categories item="entry_category" name="categories"}<a href="{$entry_category.category_link}">{$entry_category.category_name|@escape}</a>{if not $smarty.foreach.categories.last}, {/if}{/foreach}
                {/if}

                {if $dategroup.is_sticky}
                    {$CONST.ON}
                {else}
                    {$CONST.AT}
                {/if} <a href="{$entry.link}">{if $dategroup.is_sticky}{$entry.timestamp|@formatTime:DATE_FORMAT_ENTRY} {/if}{$entry.timestamp|@formatTime:'%H:%M'}</a>

                {if $entry.has_comments}
                    {if $use_popups}
                        | <a href="{$entry.link_popup_comments}" onclick="window.open(this.href, 'comments', 'width=480,height=480,scrollbars=yes'); return false;">{$entry.label_comments} ({$entry.comments})</a>
                    {else}
                        | <a href="{$entry.link}#comments">{$entry.label_comments} ({$entry.comments})</a>
                    {/if}
                {/if}

                {if $entry.has_trackbacks}
                    {if $use_popups}
                        | <a href="{$entry.link_popup_trackbacks}" onclick="window.open(this.href, 'comments', 'width=480,height=480,scrollbars=yes'); return false;">{$entry.label_trackbacks} ({$entry.trackbacks})</a>
                    {else}
                        | <a href="{$entry.link}#trackbacks">{$entry.label_trackbacks} ({$entry.trackbacks})</a>
                    {/if}
                {/if}

                {if $entry.is_entry_owner and not $is_preview}
                        | <a href="{$entry.link_edit}">{$CONST.EDIT_ENTRY}</a>
                {/if}

                {$entry.add_footer}
            </div>
{/if}


Note the added "IF" statement on the top that I added.

When you copy plugins into your plugins directory, you must go to your serendipity admin interface, go to "manage plugins" and enable them there!

Best 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/

adamswbrown
Regular
Posts: 15
Joined: Tue Mar 07, 2006 10:55 am

Post by adamswbrown » Tue Mar 07, 2006 1:25 pm

Gavin, you are a god among men :)

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

Post by garvinhicking » Tue Mar 07, 2006 1:39 pm

:-)

You are welcome. Have fun with Serendipity, and spread the word! :-)

Best 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/

adamswbrown
Regular
Posts: 15
Joined: Tue Mar 07, 2006 10:55 am

Post by adamswbrown » Tue Mar 07, 2006 6:30 pm

All working all good :)

Post Reply