<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CMS &#8211; Linux und Ich</title>
	<atom:link href="https://linuxundich.de/tag/cms/feed/" rel="self" type="application/rss+xml" />
	<link>https://linuxundich.de</link>
	<description>Blog über Ubuntu, Linux, Android und IT</description>
	<lastBuildDate>Thu, 13 Mar 2025 12:38:28 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://linuxundich.de/wp-content/uploads/2025/04/cropped-lui-app-512-32x32.png</url>
	<title>CMS &#8211; Linux und Ich</title>
	<link>https://linuxundich.de</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Admin von der &#8218;Beitrag gelesen&#8216;-Zählung im Drupal CMS  ausnehmen</title>
		<link>https://linuxundich.de/webhosting/admin-von-der-beitrag-gelesen-im-drupal-cms-zahlung-ausnehmen/</link>
					<comments>https://linuxundich.de/webhosting/admin-von-der-beitrag-gelesen-im-drupal-cms-zahlung-ausnehmen/#respond</comments>
		
		<dc:creator><![CDATA[Christoph Langner]]></dc:creator>
		<pubDate>Wed, 12 Dec 2007 15:28:10 +0000</pubDate>
				<category><![CDATA[Webdesign/-hosting]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[Drupal]]></category>
		<guid isPermaLink="false">http://christoph-langner.de/?p=31</guid>

					<description><![CDATA[Eine Standardinstallation von Drupal zählt bei aktiviertem Statistik-Modul wie oft ein Artikel gelesen, sprich aufgerufen, wurde. Allerdings wird dabei jeder Aufruf gezählt. Überarbeitet man beispielsweise als Administrator Beiträge, so verändert man dabei die Anzahl der Hits. Möchte man die Zahlen also &#8222;sauber&#8220; halten, so muss man Drupal ein wenig anpassen&#8230; Dazu bearbeitet man die Datei [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Eine Standardinstallation von <a href="http://drupal.org" target="_blank" rel="noopener">Drupal</a> zählt bei aktiviertem Statistik-Modul wie oft ein Artikel gelesen, sprich aufgerufen, wurde. Allerdings wird dabei jeder Aufruf gezählt. Überarbeitet man beispielsweise als Administrator Beiträge, so verändert man dabei die Anzahl der Hits. Möchte man die Zahlen also &#8222;sauber&#8220; halten, so muss man Drupal ein wenig <a href="http://drupal.org/node/129971" target="_blank" rel="noopener">anpassen</a>&#8230;</p>
<p><span id="more-31"></span></p>
<p>Dazu bearbeitet man die Datei <code>statistics.module</code> im Verzeichnis <code>modules/statistics</code>. Hier ersetzt man die Funktion <em>statistics_exit()</em> mit folgendem Code. Anschließend wird der Zähler nicht mehr erhöht, wenn ein Administrator oder der Autor eines Nodes den entsprechenden Artikel aufruft.</p>
<pre lang="php">function statistics_exit() {
  global $user, $recent_activity;

  drupal_bootstrap(DRUPAL_BOOTSTRAP_PATH);

  if (variable_get('statistics_count_content_views', 0)) {
    // We are counting content views.
    if ((arg(0) == 'node') &amp;&amp; is_numeric(arg(1)) &amp;&amp; arg(2) == '') {
      // A node has been viewed, so update the node's counters.
      // exclude admin &amp; node author
$nid = arg(1);
$node = node_load($nid);
$node_author = $node-&gt;uid;
if (!user_access('administer nodes') &amp;&amp; $user-&gt;uid!=$node_author) {
          db_query('UPDATE {node_counter} SET daycount = daycount + 1, totalcount = totalcount + 1, timestamp = %d WHERE nid = %d', time(), arg(1));
         // If we affected 0 rows, this is the first time viewing the node.
          if (!db_affected_rows()) {
        // We must create a new row to store counters for the new node.
        db_query('INSERT INTO {node_counter} (nid, daycount, totalcount, timestamp) VALUES (%d, 1, 1, %d)', arg(1), time());
    }
         }
    }
  }
  if ((variable_get('statistics_enable_access_log', 0)) &amp;&amp; (module_invoke('throttle', 'status') == 0)) {
    // Log this page access.
    db_query("INSERT INTO {accesslog} (title, path, url, hostname, uid, sid, timer, timestamp) values('%s', '%s', '%s', '%s', %d, '%s', %d, %d)", strip_tags(drupal_get_title()), $_GET['q'], referer_uri(), $_SERVER['REMOTE_ADDR'], $user-&gt;uid, session_id(), timer_read('page'), time());
  }
}
</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://linuxundich.de/webhosting/admin-von-der-beitrag-gelesen-im-drupal-cms-zahlung-ausnehmen/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
