Removing Trackbacks (again!)

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
pherball
Regular
Posts: 5
Joined: Tue Oct 18, 2005 7:41 pm

Removing Trackbacks (again!)

Post by pherball »

I want to remove trackbacks from my blog. I've searched this forum and learned that I have to remove the reference to trackbacks in the entries.tpl file.
I don't know anything about code. When I opened this file I found multiple references to 'trackback'. Can anybody tell me exactly which lines of code need to be deleted?
Thanks.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Removing Trackbacks (again!)

Post by garvinhicking »

Delete those lines:

Code: Select all

                {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}

Code: Select all

            <div class="serendipity_comments serendipity_section_trackbacks">
                <br />
                <a id="trackbacks"></a>
                <div class="serendipity_commentsTitle">{$CONST.TRACKBACKS}</div>
                    <div class="serendipity_center">
                        <a rel="nofollow" style="font-weight: normal" href="{$entry.link_trackback}" onclick="alert('{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|@escape:htmlall}'); return false;" title="{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|@escape}">{$CONST.TRACKBACK_SPECIFIC}</a>
                    </div>
                    <br />
                        {serendipity_printTrackbacks entry=$entry.id}
            </div>

That's it. The other references can remain, they will not be executed anymore.

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/
pherball
Regular
Posts: 5
Joined: Tue Oct 18, 2005 7:41 pm

Post by pherball »

Thanks, however I'n not finding those phrases in my entries.tpl file. Here is my entire file:

Code: Select all

    {serendipity_hookPlugin hook="entries_header" addData="$entry_id"}

    {foreach from=$entries item="dategroup"}
      {if $dategroup.is_sticky}
        <h2>{$CONST.STICKY_POSTINGS}</h2>
      {else}
        <h2>{$dategroup.date|@formatTime:DATE_FORMAT_ENTRY}</h2>
      {/if}

      {foreach from=$dategroup.entries item="entry"}
        <div class="post">
        <h3 class="storytitle" id="post-{$entry.id}"><a href="{$entry.link}" rel="bookmark" title="Permanent Link: {$entry.title}">{$entry.title}</a></h3>

        <div class="meta">Filed under:
          <ul class="post-categories">{foreach from=$entry.categories item="category"}
            <li><a title="View all posts in {$category.category_name}" href="{$serendipityHTTPPath}{$serendipityRewritePrefix}{$CONST.PATH_CATEGORIES}/{$category.category_id}-{$category.category_name|@makeFilename}">{$category.category_name}</a></li>
          {/foreach}</ul>
          — {$entry.author} @ {$entry.timestamp|@formatTime:'%I:%M %p'}
        </div>
	
	<div class="storycontent">
          <p>
            {$entry.body}
            {if $entry.is_extended}
              {$entry.extended}
            {/if}
          </p>
          {if $entry.has_extended and not $is_single_entry and not $entry.is_extended}
            <p><a href="{$entry.link}#extended">{$CONST.VIEW_EXTENDED_ENTRY|@sprintf:$entry.title}</a></p>
          {/if}
	</div>

	<div class="feedback"> 
          <a href="{$entry.link}#comments">Comments ({$entry.comments+$entry.trackbacks})</a>
          {$entry.add_footer}
	</div>

        <!--
        <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                 xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
                 xmlns:dc="http://purl.org/dc/elements/1.1/">
        <rdf:Description
                 rdf:about="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/ei_{$entry.id}.rdf"
                 trackback:ping="{$serendipityBaseURL}comment.php?type=trackback&entry_id={$entry.id}"
                 dc:title="{$entry.title}"
                 dc:identifier="{$entry.rdf_ident}" />
        </rdf:RDF>
        -->
        {$entry.plugin_display_dat}

        {if $is_single_entry and not $is_preview}
          <h2 id="comments">Comments <a href="#postcomment" title="Leave a comment">»</a></h2>
          <p>The <acronym title="Uniform Resource Identifier">URI</acronym> to TrackBack this entry is: <em>{$serendipityBaseURL}comment.php?type=trackback&entry_id={$entry.id}</em></p>
          <ol id="commentlist">
            {serendipity_printTrackbacks entry=$entry.id}
            {serendipity_printComments entry=$entry.id mode=$CONST.VIEWMODE_LINEAR}
          </ol>
          {$COMMENTFORM}
        {/if}
        </div>
      {/foreach}
    {foreachelse}
      {if not $plugin_clean_page}
        {$CONST.NO_ENTRIES_TO_PRINT}
      {/if}
    {/foreach}
Any suggestions?
pherball
Regular
Posts: 5
Joined: Tue Oct 18, 2005 7:41 pm

Post by pherball »

Oops. I see now I was looking at the wrong entries.tpl file. My bad.
Bandon
Regular
Posts: 6
Joined: Fri Jul 01, 2005 11:10 pm

Post by Bandon »

which entries.tpl (in what directory) was this file?

-Bandon
Col. Kurtz
Regular
Posts: 450
Joined: Thu May 26, 2005 10:43 am
Location: Bonn, Germany
Contact:

Post by Col. Kurtz »

You gotta edit the file of the template you are using. The synthax might look a little different in different templates, because of different styles. But the idea is the same. If there is no file in the template subfolder of the template you are using copy the entries.tpl from the default folder into your template folder and edit it.
Marc
shortbus
Posts: 1
Joined: Sat Dec 24, 2005 11:22 pm

Removed Trackbacks from main page

Post by shortbus »

Hi all,
I'm new at this whole s9y thing so please forgive my ignorance, I have removed the trackbacks link as suggested in this thread but I still see:

Trackbacks
Trackback specific URI for this entry
No Trackbacks

This shows up after clicking on the link to post a comment for my blog and I would like to remove it. Can anyone point me in the right direction?

Thanks and have a great holiday!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Removed Trackbacks from main page

Post by garvinhicking »

Shortbus: You need to cut that piece out of your entries.tpl file! Just look for the string "trackback" there!

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/
kayjay
Regular
Posts: 6
Joined: Sat Mar 18, 2006 12:23 am
Contact:

Post by kayjay »

ok, this topic is a little old but I also have a problem with the trackbacks.
I want to disable the trackbacks and with commenting the code above I did on my site.
But I still get trackback announcements in my mailbox.

When I log in as the administrator user I notice that in my personal settings the e-mail on trackback settings is set to off.

I am using serendipity with postgresql backend
the log can be found on http://www.kayjay.net
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Yes, removing the display there will still allow trackbacks to be sent to the "hidden" URL.

You can install/configure the spamblock plugin and set the "How to treat API-made comments" to "Reject" to deny any trackbacks you receive.

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/
kayjay
Regular
Posts: 6
Joined: Sat Mar 18, 2006 12:23 am
Contact:

Post by kayjay »

There is no way to get rid of trackbacks totally ?

I am not interested in trackbacks , but now I have to do a lot of hassle to avoid getting the trackback e-mails.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Yes, there is a way. I explained it to you. :-)

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/
PerfectCr
Regular
Posts: 90
Joined: Mon Nov 21, 2005 2:21 am
Contact:

Re: Removing Trackbacks (again!)

Post by PerfectCr »

Hi!

The file you need to edit is the templates/XXX/ file. NOT in templates_c. NEVER edit files in templates_c.

Apart from that, it should look pretty similar in 1.0, yes.

Best regards,
Garvin
PerfectCr
Regular
Posts: 90
Joined: Mon Nov 21, 2005 2:21 am
Contact:

Re: Removing Trackbacks (again!)

Post by PerfectCr »

PerfectCr wrote:Hi!

The file you need to edit is the templates/XXX/ file. NOT in templates_c. NEVER edit files in templates_c.

Apart from that, it should look pretty similar in 1.0, yes.

Best regards,
Garvin
Garvin, you edited my post instead of responding ;)

There is no entries.tpl file in the template/xxx directory. Only a .css file. The only entries.tpl file I see in in the templates_c directory. Furthermore, I just edited something entries.tpl file in my templates_c directory, so I now need to reinstall?
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Well, not quite that bad. Just delete the file from templates_c. If it causes any further trouble, delete everything in templates_c.

Serendipity will use the files in the default/ directory if there's no such file in the current template directory. Rather than modifying the default/entries.tpl (and maybe messing up some other template if you ever want to change), we ususally recommend copying default/entries.tpl to {your template}/entries.tpl and modifying it there.
Judebert
---
Website | Wishlist | PayPal
Post Reply