292441
mvandam
Re: SOLVED - Making Xoops CONTENT Multilingual *Fixed Code Quote problem*
  • 2003/7/17 18:17

  • mvandam

  • Quite a regular

  • Posts: 253

  • Since: 2003/2/7 2


Quote:

Toward the bottom of the module.textsanitizer.php file in your class folder,
[...]
This forces the titles to go through the XOOPS codedecoder where it will find your original language hack.


I haven't tried it, but looks like it should work. The only drawback is that if your users catch on, you might start getting all kinds of XOOPS codes in your titles, include changes of color/size, images, etc...



292442
abdala
How Do I Put Stories of a Specific News Topic in a Single Block?
  • 2003/7/17 17:48

  • abdala

  • Just popping in

  • Posts: 42

  • Since: 2003/2/5 1


(I Put this question originally in the Q & A forum which I think is the wrang place)

Hi,

I have created several news topics and now what I would like to do is to create for each topic a block which will have the titles of the articles of each respective topic. I.e say if I have a sports topic and a news topic, I want to create a block on my homepage for sports that will have the sports titles and a block for news which will have the news titles.

Anyone can help? Thanks in advance!

Abdala



292443
Chado
Re: SOLVED - Making Xoops CONTENT Multilingual *Fixed Code Quote problem*
  • 2003/7/17 15:59

  • Chado

  • Not too shy to talk

  • Posts: 113

  • Since: 2003/6/6 7


Quote:
This hack works great but what's about translating the story title not just the body content

Actually, it is also easy to make the Titles multilingual in much the same way as the content, with a simple hack to the same module.textsanitizer.php file. I did a quick look at how the tables are setup and most title fields are limited to 255 characters, so that probably is enough space most of the time for at least 2 languages.
I tested this real quickly here and it seems to work in at least the news, FAQ, Forum and WF-Sections. I don’t have a lot of other modules installed at the moment on my test site, so I couldn’t test too many others.
The only thing I found that didn't work was the comment titles. Someone might dig around and see if they can find how the comment title is produced.

Toward the bottom of the module.textsanitizer.php file in your class folder, there is a function called makeTboxData4Show and another one makeTboxData4Preview. In both of them just before the line:
return $text;
you need to add a new line like this:
$text =& $this->xoopsCodeDecode($text, 0);
That is it! This forces the titles to go through the XOOPS codedecoder where it will find your original language hack.

Hope this helps!
Chad

Here is what those two functions look like on my computer:
Quote:
function makeTboxData4Show($text, $smiley=0)
{
$text = $this->htmlSpecialChars($text);
$text =& $this->xoopsCodeDecode($text, 0);//added by chad
return $text;
}

function makeTboxData4Preview($text, $smiley=0)
{
$text = $this->stripSlashesGPC($text);
$text = $this->htmlSpecialChars($text);
$text =& $this->xoopsCodeDecode($text, 0);//added by chad
return $text;
}



292444
dagdvd
Re: Banner Ads in a Block - How
  • 2003/7/17 15:48

  • dagdvd

  • Just popping in

  • Posts: 2

  • Since: 2002/2/6 1


created a custom block
inserted <{$xoops_banner}> and select php scripts

tried it but no luck



292445
Catzwolf
Re: NewBB Problem?
  • 2003/7/17 15:17

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Turn on php debugging and see if there is any error warning shown, if so copy and paste it here. This may give a better idea of what is going on.



292446
DobePhat
Re: NewBB Problem?
  • 2003/7/17 15:11

  • DobePhat

  • Friend of XOOPS

  • Posts: 656

  • Since: 2003/4/15


Same problem here... ,
I've been tracking this issue for months...
I havent tried with globals on... but it is supposed to work with globals off. So I don't know, I sure hope someone can help us..



292447
beyond_
Re: Autologin - does it update xoopsmembers "last login date"
  • 2003/7/17 14:04

  • beyond_

  • Just popping in

  • Posts: 1

  • Since: 2003/6/8 1


Hi Double1,

I just installed this hack and it doesn't update the "last Login Date" on the xoopsmembers module either.

If you don't mind that 'last login date' actually shows 'last seen date' you can do the following:

Insert code after line 49 ($online_handler->write($uid, $uname, time(),...) in modules/system/blocks/system_blocks.php.

// Update last_login xoops_users-table
$sql "SELECT count(*) FROM ".$xoopsDB->prefix("users")." WHERE uid=".$uid."";
$result $xoopsDB->query($sql);
list(
$getRowsNum) = $xoopsDB->fetchRow($result);

if ( 
$getRowsNum 0) {
   
$sql "UPDATE ".$xoopsDB->prefix("users")." SET last_login = " time() . " WHERE uid=".$uid."";

   
$xoopsDB->queryF($sql);
}
// End update last_login xoops_users-table


Also add $xoopsDB to the globals in line 34 so it reads:
global $xoopsDB$xoopsConfig$xoopsUser$xoopsModule$HTTP_SERVER_VARS;


Good luck,
Inge



292448
mvandam
Re: SOLVED - Making Xoops CONTENT Multilingual *Fixed Code Quote problem*
  • 2003/7/17 11:03

  • mvandam

  • Quite a regular

  • Posts: 253

  • Since: 2003/2/7 2


Hmmm, seems trickier. The title is stored in a relatively small fixed-length field. If you started adding:

[english]My Title[/english][gibberish]@#$SassdD#233[/gibberish]

you would soon run out of space for the real title. So I don't think the same approach would work easily unless title field was vastly extended in size.

Any ideas?



292449
niko11
Re: SOLVED - Making Xoops CONTENT Multilingual *Fixed Code Quote problem*
  • 2003/7/17 10:34

  • niko11

  • Just popping in

  • Posts: 4

  • Since: 2003/6/27


This hack works great but what's about translating the story title not just the body content . Maybe someone has found a way to translate the article title on-the-fly?

TIA
Niko



292450
JanM49
Re: Blank page after instalation
  • 2003/7/17 10:22

  • JanM49

  • Just popping in

  • Posts: 1

  • Since: 2003/7/17


solved my blank-page problem after installation.
I use WS-FTP as ftp program. problem appeared to be the chmod settings of the upload/cache/templates_c folders and the mainfile.php.
these folders and file need to have chmod 777 ; but when you only click read AND write in WS-FTP they only get chmod 766. So make sure that in WS-FTP you tick read, write, AND execute for the Owner, the Group and Other (all 9 ticked)
After doing that.........yep it worked !

hope this helped







Login

Who's Online

101 user(s) are online (67 user(s) are browsing Support Forums)


Members: 0


Guests: 101


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits