| Author |
Message |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2736 Location: Germany |
|
|
|
 |  | 3. You use Default template from 1.1.1? You use cache? |
I don't understand the plugin. This function shows the rating, right?
 |  | function rating($what = ''){
global $tpl;
if ($what == 'check'){
return ($_COOKIE['cnpostrating'.$tpl['post']['id']] ? true : false);
} else {
return @round(($tpl['post']['rating'] / $tpl['post']['votes']), 0);
}
} |
But $tpl['post']['rating'] and $tpl['post']['votes'] are empty. Where in the plugin do you give them the values?
|
|
| Wed Jul 26, 2006 11:17 pm |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
lexa
Creator of CuteNews.RU

Joined: 02 Oct 2005 Posts: 90 Location: St.-Petersburg, Russia |
|
|
|
Yes, function return rating or check cookies.
In show.news.php first line (after foreach) $tpl['post'] = $row.
I mean $row['rating'] = $tpl['post']['rating']
Maybe not work in you browser?
|
|
| Wed Jul 26, 2006 11:24 pm |
 |
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2736 Location: Germany |
|
|
|
I tested it in IE and FF - nothing.
Then I put print_r($tpl); to the function in rating.php to check the $tpl variable. This is what I get:
 |  | Array ( [post] => Array ( [date] => 26 Jul 2006 [author] => FI-DD [title] => News2 [short_before_join_story] => 5 [full_before_join_story] => 4 [avatar] => [category] => Array ( [name] => [icon] => [id] => [description] => ) [url] => news2 [id] => 2 [views] => 6 [comments] => 2 [hidden] => [sticky] => [keywords] => Array ( [name] => hallo, test [id] => 1, 2 ) [type] => [parent] => 0 [level] => 0 [password] => [rating] => [post_id] => 2 [short] => short story [full] => full story |
So [rating] is empty. And where is [votes]?
Well, I will test this tomorrow with MySQL so I can use phpmyadmin to check the tables.
Thanks and Good Night. 
|
|
| Wed Jul 26, 2006 11:43 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2736 Location: Germany |
|
|
|
It worked from the start using MySQL.
So I guess it was a problem with the news table in the txtSQL database.
|
|
| Thu Jul 27, 2006 9:58 am |
|
 |
lexa
Creator of CuteNews.RU

Joined: 02 Oct 2005 Posts: 90 Location: St.-Petersburg, Russia |
|
|
|
You right, with txtSQL not work. Sux .
I know why.
Open plugins/rating.php and find:
 |  | 'values' => array('type' => 'int', 'default', 'default' => 0) |
Change to:
 |  | 'values' => array('type' => 'int', 'default' => 0) |
|
|
| Thu Jul 27, 2006 12:54 pm |
 |
 |
scottdallas

Joined: 04 May 2006 Posts: 1843 Location: US |
|
|
|
With MySQL everything seems to be working perfectly for me. I'm actually translating it to english to make it easier for me to get around. I'm straight up editing files in inc/mod and the skins folder though.. mostly inc/mod though.. Is that going to take out all the Russian? Is there a better way of translating? It looks good for me but I worry that when people go to install it, it would be English only because of the way I'm doing it.
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Thu Jul 27, 2006 8:49 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2736 Location: Germany |
|
|
|
I don't really understand you. Most of the script is already in English. Only some plugins and some javascript needs to be translated.
|
|
| Thu Jul 27, 2006 8:56 pm |
|
 |
lexa
Creator of CuteNews.RU

Joined: 02 Oct 2005 Posts: 90 Location: St.-Petersburg, Russia |
|
|
|
Scott talk about text in code (in function t()). I think.
|
|
| Thu Jul 27, 2006 9:01 pm |
 |
 |
scottdallas

Joined: 04 May 2006 Posts: 1843 Location: US |
|
|
|
Oh, is 1.1.1 not translated yet? I have to use 1.0.1?
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Thu Jul 27, 2006 9:06 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2736 Location: Germany |
|
|
|
 |  | Oh, is 1.1.1 not translated yet? I have to use 1.0.1? |
Yes, it is in English (mostly). That's why I wonder why you are going to translate it?
|
|
| Thu Jul 27, 2006 9:11 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1843 Location: US |
|
|
|
 |  | Yes, it is in English (mostly). That's why I wonder why you are going to translate it? |
Haha cause I'm diligent and a moron! My brain is the size of a peanut. Leave me alone. I read Lexa's post to pick EN from the drop down and try 1.1.1 so I figured it would all pop up in English. I'll start with 1.0.1 and see what happens. My mistake 
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Thu Jul 27, 2006 9:13 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2736 Location: Germany |
|
|
|
I still don't get it.
1.0.1 is an outdated version. Why don't you use the latest 1.1.1? It's in English.
 |  | I read Lexa's post to pick EN from the drop down and try 1.1.1 so I figured it would all pop up in English. |
That's what it did for me.
|
|
| Thu Jul 27, 2006 9:19 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1843 Location: US |
|
|
| Thu Jul 27, 2006 9:23 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2736 Location: Germany |
|
|
|
Wow, that's really strange.
I'm installing it on my webspace at the moment. I'll report back.
Edit:
It's working perfectly. Must be your server then. No idea why this is happening.
|
|
| Thu Jul 27, 2006 9:40 pm |
|
 |
lexa
Creator of CuteNews.RU

Joined: 02 Oct 2005 Posts: 90 Location: St.-Petersburg, Russia |
|
|
|
Try use this langpack.
Put to strawberry/lang/en
|
|
| Thu Jul 27, 2006 9:49 pm |
 |
 |
|