Page 1 of 1

How do i Change somthing?

Posted: Tue Mar 07, 2006 10:57 am
by adamswbrown
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.

Re: How do i Change somthing?

Posted: Tue Mar 07, 2006 12:54 pm
by garvinhicking
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

Posted: Tue Mar 07, 2006 12:56 pm
by adamswbrown
Where do i put the entries.tpl file?

Thank you very much Gavin

Posted: Tue Mar 07, 2006 1:03 pm
by garvinhicking
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

Posted: Tue Mar 07, 2006 1:03 pm
by adamswbrown
Thanks gavin. much apreiccated

Posted: Tue Mar 07, 2006 1:07 pm
by adamswbrown
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)

Posted: Tue Mar 07, 2006 1:23 pm
by garvinhicking
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

Posted: Tue Mar 07, 2006 1:25 pm
by adamswbrown
Gavin, you are a god among men :)

Posted: Tue Mar 07, 2006 1:39 pm
by garvinhicking
:-)

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

Best regards,
Garvin

Posted: Tue Mar 07, 2006 6:30 pm
by adamswbrown
All working all good :)