11
franfran
Re: mysql 4.1.7 and utf8 problem
  • 2005/1/7 10:01

  • franfran

  • Just popping in

  • Posts: 21

  • Since: 2004/2/10


Yes, I have the following set:

define("XOOPS_USE_MULTIBYTES", "1");

Also, in apache, I have the following as well:
AddDefaultCharset UTF-8

thanks.



12
franfran
mysql 4.1.7 and utf8 problem
  • 2005/1/7 7:56

  • franfran

  • Just popping in

  • Posts: 21

  • Since: 2004/2/10


Hi,

Previously I have posted my problem in another thread:
https://xoops.org/modules/newbb/viewtopic.php?topic_id=29446

However, I have discovered it is indeed a character set problem. So I start a new topic in here.

With my config below, install a new XOOPS and a new database I get 'blank content' on all modules display:

-- CONFIG --
REDHAT 9.0
APACHE 2.0.48
PHP 4.3.10
MYSQL 4.1.7

under my.cnf:
[mysqld]
set-variable = default-character-set=utf8

under xoops->global.php:
define('_CHARSET''utf-8');

define('_CHARSET''utf-8');

-- CONFIG END --

After the installation, the collation of the tables are utf8. In this case, when you browse your site, the smarty will generate all modules block, however, their content are blank, only title displayed.

screenshot:
http://www.angelfire.com/linux/franfran/xoopsblank.gif
You may copy and paste the link above to your browser

If collation is utf8_general_ci, the modules would be blank. If collcation is latin, everything is fine.

Everything is fine if running MySQL 4.1.0, collation utf8

Did I make a mistake somewhere?
Thank you.



13
franfran
strange problem for mysql
  • 2005/1/4 9:35

  • franfran

  • Just popping in

  • Posts: 21

  • Since: 2004/2/10


Hi,

I am trying to upgrade my MySQL to 4.1.7. The upgrade is smooth without a problem, I can see the new database having identical data with the old one, however, all blocks in XOOPS site are blank now(I can see the block title show, but no content).

I tried to debug the program and I found that the code use the following to assign content to the template:

$xoopsTpl->assign('somevar', $somecontent);


I then tried to dig deeper into the class/smarty/Smarty.class.php file. I find out that the $value passed to the function 'assign' is blank. I mean after the variable passed, the $value become blank inside the assign function.

I then try to do:
var_dump($somecontent);
before or after the xoopsTpl->assign code, it shows everything without problem. I am sure that the code can draw the data from database(all data is in $somecontent array). The problem occur only when using the xoopsTpl->assign function, the $value would become blank when passed to assign function.

I then switch back to my old DB, everything back to normal.

I wonder why? Since passing variable in PHP shouldn't have anything related to database version...
Any clue in here? Following is my config, thanks!

PHP 4.3.10
XOOPS 2.0.6

Before:
MYSQL 4.1.0, UTF8 as charaset

After:
MYSQL 4.1.7, UTF8 as charaset


P.S. I tried to empty the template_c folder, no luck



14
franfran
Re: Custom Block problem
  • 2004/2/27 8:04

  • franfran

  • Just popping in

  • Posts: 21

  • Since: 2004/2/10


yeah, but I want a "borderless" block.
I "kind of" found a solution. For your info, you can see my thread in here



15
franfran
determining where am I in theme.html
  • 2004/2/27 5:40

  • franfran

  • Just popping in

  • Posts: 21

  • Since: 2004/2/10


I come up this question due to the requirement in here .
In a short summary, I want to "display a borderless custom block on homepage only". So a custom block that is only a plain square, without anything, and I can put my html code in the cutom block. To be more specific, "borderless" means without the block title - without
<tr><td class="blockTitle">&nbsp;<{$block.title}></td></tr>

The suggested hack is pretty good idea which could resolve my problem. However, I also read this. I think this is the best one for me, since I do not need to modify any php code, easier to maintain and upgrade.

So my solution is to make a custom block named "mainpic", and in theme.html check if block.title is "mainpic" then display the block without border:

<{if $block.title =="mainpic"}>
<!-- custom block for mainpic -->
HTML... or an include file.
<{else}>
<!-- normal block render -->
<{/if}>

What if I want to check:
"if (current section is homepage) and (block.title equal "mainpic")"?

Is it possible?

Thank you very much.



16
franfran
Re: Custom Block problem
  • 2004/2/27 4:25

  • franfran

  • Just popping in

  • Posts: 21

  • Since: 2004/2/10


thanks for the link.
I think I will try that method. so the concept should be "different section could use different layout(theme) file".
And we can put the mainpic html code in that specific theme file.

Becuase at first I want to make the mainpic to be a custom block so that a non-tech webmaster can change the mainpic by editing the custom block through the XOOPS admin.




17
franfran
Re: Custom Block problem
  • 2004/2/26 11:24

  • franfran

  • Just popping in

  • Posts: 21

  • Since: 2004/2/10


Thanks for your reply.
you mean editing theme.html?
yes I can edit it and add the html in there. However, if I add in theme.html it will apply to the whole site. But I only want the mainpic display in Homepage only.

Or I misunderstand? Not in theme.html?
thanks!



18
franfran
Re: Custom Block problem
  • 2004/2/26 10:49

  • franfran

  • Just popping in

  • Posts: 21

  • Since: 2004/2/10


To make it more clear, how can I make a Main Picture section likehttp://gaining-mass.com/

THANKS!



19
franfran
Custom Block problem
  • 2004/2/26 10:29

  • franfran

  • Just popping in

  • Posts: 21

  • Since: 2004/2/10


Hi, I would like to add some content in my homepage only. To resolve this, I found out that I can simply use the custom block features. Paste the html content in there, and configure the block to show on homepage only.
However, my problem is, I do not want BORDER in that paticular block. I know I can cut out the "blockTitle" line, but if I do that all ccblocks content will be "borderless".
I want THAT block without border. Is it possible?

Thank you very much.



20
franfran
Re: XOOPS and InnoDB
  • 2004/2/13 7:57

  • franfran

  • Just popping in

  • Posts: 21

  • Since: 2004/2/10


thanks guys. I think I will give it a try.
may post here if found any compatibility problems.





TopTop
« 1 (2) 3 »



Login

Who's Online

147 user(s) are online (128 user(s) are browsing Support Forums)


Members: 0


Guests: 147


more...

Donat-O-Meter

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

Latest GitHub Commits