Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2007-05-12 09:33:43

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,300
Website

Re: dzd_counter_view: article view counter

The form you use seems ok

If you set a custom_field with name countxx, right?

Try something:

change like this:
<txp:if_individual_article>
<p class=“crumb”><txp:etz_crumbs category=“2” section=“0” atitle=“1” /></p>
<txp:if_custom_field name=“best”><h2 class=“best”><txp:else /><h2></txp:if_custom_field><txp:title /></h2>
<txp:if_custom_field name=“Price”>
<p class=“rounded”><txp:custom_field name=“Price” /> руб.</p>
</txp:if_custom_field> <p>Добавить в закладки <a href=“http://del.icio.us/post?url=<txp:permlink />&amp;title=<txp:title />”>del.icio.us</a>
</p>
<span class=“float”>
<txp:hak_article_image />
<p><a href=”/article/dostavka” title=“Доставка”>Доставка</a> работает с 9.00 до 19.00 (пн-пт). Подробности по телефону: +7(495)771-20-40
</p>
</span>
<txp:article form=“newform” />
<txp:related_articles label=“Похожие товары:” limit=“10” break=“li” wraptag=“ul” section=tovary />
<div style=“clear:both;”></div>
</txp:if_individual_article>

and cerate new article form call it “newform” and put in
<txp:dzd_counter_view force=“1” />
<txp:body />
<txp:custom_field name=“countxx” />

And tell me what happens.

Offline

#12 2007-07-27 11:19:41

premek.b
Member
From: Pilsen, CZ
Registered: 2006-05-17
Posts: 18
Website

Re: dzd_counter_view: article view counter

Hi, I played a bit with the plugin and added an (obvious ;-) small extension to allow any custom field to be used for counting. The link leads to an article + download link; the download is only a zipped PHP source of the plugin (no time to package into plugin proper, sorry).

Premek


“So, where is the patch?”
((former nick pbrada))

Offline

#13 2008-07-15 05:59:53

mwr
Member
From: Canada
Registered: 2006-01-31
Posts: 151
Website

Re: dzd_counter_view: article view counter

One of my articles got spammed mercilessly, and so the counter is way higher than it should be. Is there any way I can get this article back to zero without affecting the others?


Mark

Offline

#14 2008-07-15 07:53:17

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: dzd_counter_view: article view counter

mwr – if counter is located in one of custom fields, than just edit your article as usual and enter requered value to custom field, where counter is located.


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#15 2008-07-15 08:31:02

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,300
Website

Re: dzd_counter_view: article view counter

the_ghost a écrit:

mwr – if counter is located in one of custom fields, than just edit your article as usual and enter requered value to custom field, where counter is located.

Hi, that s right, you only need de edit your article and change the value in custom_field : countxx and the couting will continue with that value.

Cheers

Offline

#16 2008-07-15 16:49:28

mwr
Member
From: Canada
Registered: 2006-01-31
Posts: 151
Website

Re: dzd_counter_view: article view counter

That was almost too easy. Thanks.


Mark

Offline

#17 2008-12-06 19:13:16

pinky
Member
From: London
Registered: 2008-12-02
Posts: 45
Website

Re: dzd_counter_view: article view counter

Hi,
Have installed this plugin but I can’t get a numeric value to display on the webpage. The code in my default article form is:

<txp:if_section name="about,contact,credits">
<h2><txp:title /></h2>
<txp:else />
<h2><txp:permlink><txp:title /></txp:permlink></h2>
</txp:if_section>
<txp:dzd_counter_view force="0" />
<txp:body />
<txp:if_section name="about,contact,credits">
<txp:else />
<p class="meta"><txp:posted /> | Page views: <txp:custom_field name="countxx" /><br />
Filed under <txp:category1 link="1" /> <txp:category2 link="1" /> | <txp:comments_invite /></p>
</txp:if_section>

I’ve named a custom field as countxx and the custom field in the article is blank.

Offline

#18 2008-12-07 07:59:38

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,300
Website

Re: dzd_counter_view: article view counter

Hi pinky

you must use force=“1” that will put a “0” in the custom field countxx

Cheers

Offline

#19 2008-12-07 11:22:39

pinky
Member
From: London
Registered: 2008-12-02
Posts: 45
Website

Re: dzd_counter_view: article view counter

Just tried that and it still hasn’t worked. Thanks for the reply though, I appreciate that language issue but if you can let me know where I should be looking to try and troubleshoot where the issue lies, I’ll get on it.

Offline

#20 2008-12-07 11:47:23

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,300
Website

Re: dzd_counter_view: article view counter

What happen exactly when you load the article? is there any error message or it s only not doing anything? wich version of txp are you using?

I tested it under txp 4.0.7 right now and it works here is the default template used:

bq.<txp:if_individual_article>
<h1 class=“entry-title”><txp:permlink><txp:title /></txp:permlink></h1>
<txp:dzd_counter_view force=“1” />
<txp:else />
<h3 class=“entry-title”><txp:permlink><txp:title /></txp:permlink></h3>
</txp:if_individual_article>
<p class=“published”><txp:posted /></p>
<div class=“entry-content”>
<txp:body />
<p>Vue :<txp:custom_field name=“countxx” /><br /></p>
</div>
<address class=“vcard author”>— <span class=“fn”><txp:author /></span></address>
<p class=“tags”><txp:category1 title=“1” link=“1” />, <txp:category2 title=“1” link=“1” /></p>
<txp:comments_invite wraptag=“p” />
<div class=“divider”><img src=”<txp:site_url />images/1.gif” width=“400” height=“1” alt=”—-” title=”“ /></div>

NB: The first time you use it it display nothing but if you see the article tab you can see that the countxx field is set to zero.

Cheers

Offline

Board footer

Powered by FluxBB