Page 1 of 1

Removing the "Posted by XXXX | Date" message

Posted: Sun Feb 07, 2010 2:56 pm
by gilboy
Hi

I am hoping to use the blog on my website as an event-guide.

When I go to add a new event I set the date on the blog entry as the date of the event, e.g. April 1 and I have configured the blog such that it shows future entries. Furthermore, when I create each event entry/blog entry I specify not to allow comments to this event entry/blog entry.

The only problem I have is that when somebody looks at my event guide, when they see the entry for April 1, it says - "Event posted on April 1", which obviously confuses them as this is a future date.

Is there anyway I can configure the blog such that the "Posted by XXX | April 1" does not appear beside each blog entry or even better that - it just outputs "Posted b XXX"

Thanks!
Joe

Re: Removing the "Posted by XXXX | Date" message

Posted: Sun Feb 07, 2010 4:38 pm
by Don Chambers
That information is emitted by the smarty template file entries.tpl. Your template may have its own version of this file. If not, it will be using the one from the folder/templates/default/. If you are using the default version, copy it first to your template folder (/templates/your-template-folder/) before modifying.

If using the default template, the code you need to modify is this:

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>
You can modify the code like this so that it will only emit the author, categories, and an edit link for logged in authors:

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

                {$entry.add_footer}
            </div>

Re: Removing the "Posted by XXXX | Date" message

Posted: Sun Feb 07, 2010 7:00 pm
by gilboy
Thanks very much for the response Don.

Just one further question on this. I have changed the entries.tpl file in a number of the template sun-directories but still no change. Just wondering is there any easy way to determine which entries.tpl file is being used. I have checked in the blog admin console but have not found anything

Thanks!

Re: Removing the "Posted by XXXX | Date" message

Posted: Sun Feb 07, 2010 7:15 pm
by gilboy
Please ignore previous post.

I tries all the subfolders within the templates folder and eventually found that it was the entries.tpl file within a folder called rcsBlog that was been used

Thanks for help

Re: Removing the "Posted by XXXX | Date" message

Posted: Sun Feb 07, 2010 8:19 pm
by Don Chambers
gilboy wrote:Please ignore previous post.

I tries all the subfolders within the templates folder and eventually found that it was the entries.tpl file within a folder called rcsBlog that was been used

Thanks for help
Sounds like you are using RVSiteBuilder.... sure are a lot of those here lately. Sure wish they wouldn't do things their own way! :evil:

Still happy to hear you resolved your issue. :wink:

Re: Removing the "Posted by XXXX | Date" message

Posted: Sun Feb 07, 2010 9:24 pm
by gilboy
Yes am using RVSiteBuilder.

Sorry 1 more quick question on this.
When I view the blog entries they are returned showing my most recent entries first

Since I am using the blog as an event guide, I was hoping to order the events such that they are ascending on the event date.

In other words, assume I have 3 events in my event guide for the month of March. If I add an event today and set the date to April 1, 2010, when I view the blog/event guide the first event/entry which will appear will be the one for April 1 2010. Ideally, I would like to display the events ordered ascending by the event/blog entry date

Hope this makes sense
Joe

Re: Removing the "Posted by XXXX | Date" message

Posted: Sun Feb 07, 2010 9:36 pm
by Don Chambers
Try the event plugin "Properties/Templates of categorie". It has a few different sorting options if I remember correctly.