|
Page 1 of 1
|
danicom 
Joined: November 2006
Posts: 18
Location:
|
 Error In News Counter
Hi, I have found a error in the news counter.
If you go to portal (in this site 4 ex.) and you read one news
http://www.icyphoenix.com/index.php?topic_id=1210
And the counter have 244 views, if you reload the same page the counter don't change.
Or if you arrive directly to this link
http://www.icyphoenix.com/index.php?topic_id=1210
the views counter remains equal, but if you go to this link
http://www.icyphoenix.com/viewtopic.php?t=1210
(Basically its the same post, but not in portal) your view it's added to the counter.
The views counter don't work correctly. The problem it's the same for XS o Icy.
In my portal, for example, I use the option for show only, in portal, a maximum number of words, and you need click over "Read more" to read the entire article. And I receive many visits directly to the portal, and my visitors use the option read more, I have therefore false data in the views counter.
Thnks.
Daniel Comin
http://zm.nu
http://zm.nu/foro2
Running XS & pending upgrade to Ici
|
#1 Mon 05 Mar, 2007 19:54 |
|
Sponsors

|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
| |
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 Re: Error In News Counter
The counter it is linked only to the viewtopic, not even to the news shown in portal... I don't think it is a bug, because I would consider a topic as viewed only when you can see the whole discussion...
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#2 Thu 08 Mar, 2007 01:59 |
|
Zuker 
Joined: August 2006
Posts: 2134
Location:  BA
|
 Re: Error In News Counter
 there is no bug
____________ ? Zuker - EDDB - LPM - Sharefields
|
#3 Thu 08 Mar, 2007 13:52 |
|
danicom 
Joined: November 2006
Posts: 18
Location:
|
 Re: Error In News Counter
The counter it is linked only to the viewtopic, not even to the news shown in portal... I don't think it is a bug, because I would consider a topic as viewed only when you can see the whole discussion... 
Much people read the news in the portal, even the commentaries, are not obligatory to respond.
Under this link of course http://zm.nu/foro2/index.php?topic_id=1403
If I have the option to cut the news for show the complete article inside the portal the counter must contemplate those readings.
Two options for show the same news, one counter.
|
#4 Thu 08 Mar, 2007 15:53 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 Re: Error In News Counter
The counter it is linked only to the viewtopic, not even to the news shown in portal... I don't think it is a bug, because I would consider a topic as viewed only when you can see the whole discussion... 
Much people read the news in the portal, even the commentaries, are not obligatory to respond.
Under this link of course http://zm.nu/foro2/index.php?topic_id=1403
If I have the option to cut the news for show the complete article inside the portal the counter must contemplate those readings.
Two options for show the same news, one counter.
Ok, when I have some free time I'll help you integrating this in portal.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#5 Sun 11 Mar, 2007 12:24 |
|
danicom 
Joined: November 2006
Posts: 18
Location:
|
 Re: Error In News Counter
Ok Tnkks
|
#6 Mon 12 Mar, 2007 17:50 |
|
Proclama 
Joined: March 2007
Posts: 1
Location:  Berghem
|
 Re: Error In News Counter
Hi,
I try to work on this features but I'm not so expert with PHP…
So I do this work-around:
In file: ./include/news.php
at line: 166
I replace the code with this:
//'READ_MORE_LINK' => ($show_abstract && $trimmed) ? '<a href="' . $this->config['news_base_url'] . PORTAL_MG . '?topic_id=' . $article['topic_id'] . '">' . $lang['Read_More'] . '</a>' : '',
'READ_MORE_LINK' => ($show_abstract && $trimmed) ? '<a href="' . $this->config['news_base_url'] . VIEWTOPIC_MG . '?t=' . $article['topic_id'] . '">' . $lang['Read_More'] . '</a>' : '',
So the link "READ_MORE_LINK" open the post in the forum (viewpost.php?t=XXX) instead the portal news (index.php?topic_id=XXX).
Is not the same but is a quickly temporary workaround...
If someone can tell me which is the code that increase the counter in the topic and which is the code to modify for the news, I try to work on this…
Thanks and sorry for my bad english,
Stefano.
[EDIT] Dimenticavo... se volete controllare sul sito in firma ho introdotto questa feature[/EDIT]
|
#7 Thu 29 Mar, 2007 11:58 |
|
danicom 
Joined: November 2006
Posts: 18
Location:
|
 Re: Error In News Counter
Thnk you very much Proclama,
It's a temporary solution. In Minerva this problem does not exist, I go to look inside Minerva to discover the posible solution.
Thnks
Daniel
|
#8 Thu 29 Mar, 2007 12:37 |
|
danicom 
Joined: November 2006
Posts: 18
Location:
|
 Re: Error In News Counter
Any new?
|
#9 Tue 31 Jul, 2007 09:50 |
|
danicom 
Joined: November 2006
Posts: 18
Location:
|
 Re: Error In News Counter
I MG, you have some free time?
I wait your news, or your indications, if you don't have more time, I need only the minimal instructions to start.
Thnks
Daniel
|
#10 Tue 25 Sep, 2007 12:08 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 Re: Error In News Counter
Sorry, I totally forgot this.
You can do something like this:
if (!empty($_GET['topic_id']) && (intval($_GET['topic_id']) > 0))
{
$topic_id_v = $_GET['topic_id'];
$sql = "UPDATE " . TOPICS_TABLE . "
SET topic_views = topic_views + 1
WHERE topic_id = $topic_id_v";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not update topic views.", '', __LINE__, __FILE__, $sql);
}
}
And add it everywhere to your page_header.php.
Let me know if it is working fine.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#11 Tue 23 Oct, 2007 23:29 |
|
danicom 
Joined: November 2006
Posts: 18
Location:
|
 Re: Error In News Counter
|
#12 Thu 25 Oct, 2007 19:12 |
|
|
Page 1 of 1
|
Was this topic useful?
Was this topic useful?
| Link this topic |
| URL |
|
| BBCode |
|
| HTML |
|
You cannot post new topics You cannot reply to topics You cannot edit your posts You cannot delete your posts You cannot vote in polls You cannot attach files You can download files You cannot post calendar events
|
|
|
|