Attached is a MLE patch for the Statistics module.
Regards,
Carsten
Patch for Statistics module
Patch for Statistics module
- Attachments
-
[The extension txt has been deactivated and can no longer be displayed.]
Re: Patch for Statistics module
Hi,
I have MLE 1.2.4b and added this patch. I have 2 languages: english and dutch. Before the patch, the Current Online Visitors always calles the pages by the Dutch titles. After the patch it calles all the pages by the English title. Ofcourse it needs to call the pages whatever is really is (so if I visit a Dutch page, I would like the dutch title and an english page should get an english title in Current Online Visitors).
What can I do?
Sincerely,
Sirab
I have MLE 1.2.4b and added this patch. I have 2 languages: english and dutch. Before the patch, the Current Online Visitors always calles the pages by the Dutch titles. After the patch it calles all the pages by the English title. Ofcourse it needs to call the pages whatever is really is (so if I visit a Dutch page, I would like the dutch title and an english page should get an english title in Current Online Visitors).
What can I do?
Sincerely,
Sirab
Re: Patch for Statistics module
Hi Sirab,
sorrry for the delay.
Without this patch, you see most time no page titles. Or, if you have transferred a normal site to MLE, you see only the old page titles, but no titles for new pages (or if you change a page title).
Regards,
Carsten
sorrry for the delay.
That's not exactly what happens. "Statistics" only count pages with their pageid, regardless if you access the Dutch or English version. And in the "Statistics" you see now the page titles according to your current language setting.Before the patch, the Current Online Visitors always calles the pages by the Dutch titles. After the patch it calles all the pages by the English title.
Without this patch, you see most time no page titles. Or, if you have transferred a normal site to MLE, you see only the old page titles, but no titles for new pages (or if you change a page title).
That would be really nice But needs a lot of more changes in "Statistics" (and makes "Statistics" uncompatible to the standard version.)Ofcourse it needs to call the pages whatever is really is
Regards,
Carsten
Re: Patch for Statistics module
Ok, thanks!
Re: Patch for Statistics module
...and? still I dont know what should I to modify for good work module..
CMS Made Simple! Best CMS!
Re: Patch for Statistics module
Is a diff file:requish wrote: ...and? still I dont know what should I to modify for good work module..
Edit modules/Statistics/Statistics.module.php and (around 644 row) and look for signs:--- modules/Statistics/Statistics.module.php.orig 2008-04-22 17:36:43.859375000 +0100
+++ modules/Statistics/Statistics.module.php 2008-04-22 17:37:16.765625000 +0100
@@ -644,7 +644,10 @@
function InternalGetPageTitle($content_alias, $forcemenutext=false) {
$db=&$this->GetDb();
- $query="SELECT content_name,menu_text FROM ".cms_db_prefix()."content WHERE content_alias=? OR content_id=?";
+// Start MLE
+ global $mleblock;
+ $query="SELECT content_name$mleblock AS content_name,menu_text$mleblock AS menu_text FROM ".cms_db_prefix()."content WHERE content_alias=? OR content_id=?";
+// End MLE
$dbresult=$db->Execute($query,array($content_alias,$content_alias));
if (!$dbresult || $dbresult->RecordCount()==0) return "";
$row=$dbresult->FetchRow();
- Delete this row
+ Add this row
Alby
Last edited by alby on Sat Mar 07, 2009 9:14 am, edited 1 time in total.