NewART Development Web development tutorials, SEO articles and PHP script resources

12Mar/100

getParam() in Zend Framework

How do you use the getParam() Front Controller Parameter ?

usually in php your link should be somthing like:

user.php?action=aboutuser&username=coolname&gender=male

and You call it


$_GET["username"];

$_GET["gender"];

But in Zend Framework the url looks more like this:

hostname/user/aboutuser/username/wiwit/gender/man

And we can interpret it like this:

20Feb/100

MySQL Workbench error : font Trebuchet MS does not support style regular

Lately i updated my MYSQL GUI TOOL fron MySQL Administrator and MySQL Query Browser to MySQL Workbench.

Pretty nice tool i may add but i got a fatal error:

font "Trebuchet MS" does not support style "regular"

Hmm...thats an easy fix, all you have tot do is install the required font and you ar good to go.

Here is the missing font: Font Trebuchet MS

23Aug/090

Submit using an input image type: fix for IE

Well if you try login with an input image type you will have a small problem in IE:  it wont work.

HTML :

<input name="submit" src="path/to/image.gif" type="image" value="Submit"

PHP

// start processing on submit or submit_x
if (isset($_POST['submit']) || isset($_POST['submit_x'])) {
// run code here
}

This should fix the problem in IE. Just add isset($_POST['submit_x'] in the conditional

20Aug/090

Flex applications with transparent background

Maybe you need a transparent background for your application BUT where is the button???

Well is pretty simple all you have to do are 2 simple things :

1)

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundAlpha="0.0">

As you may see i added backgroundAlpha equal to zero.

2)

AC_FL_RunContent(
...,
"wmode", "transparent"
);

just add "wmode", "transparent" in html file generated by Flex Builder under AC_FL_RunContent

Filed under: Flex No Comments
12Jan/090

Problems with charset on vbulletin

Either if special chars arent displayed corectly when you submit a new thread or when you use Rss Feed Manager you should look into :

Language / Charset Problems - Things To Check
Some people encounter problems with garbled characters when using vBulletin with non-English languages. Here are some things you can check based on my experience troubleshooting these problems:
I mention this solution i found on vbulletin forums
1. Make sure your HTML charset is appropriate to your forum language:

Admin CP -> Languages & Phrases -> Language Manager -> [Edit Settings] -> HTML Character Set

_____
2. Also try emptying the blank character stripper:

Admin CP -> vBulletin Options -> Censorship Options -> Blank Character Stripper

_____
3. Also, the line wrapper can sometimes cause problems with multi-byte languages:

Admin CP -> vBulletin Options -> Thread Display Options (showthread) -> Number of Characters Before Wrapping Text

_____
4. Also, the "prevent shouting" feature can cause problems for some non-English languages. Try disabling it:

Admin CP -> vBulletin Options -> Message Posting and Editing Options -> Prevent 'SHOUTING'

_____
5. You might also need to set the MySQL charset in your includes/config.php file by uncommenting this line. This setting was added starting with 3.5.x:

//    ****** MySQLI OPTIONS *****
// When using MySQL 4.1+, MySQLi should be used to connect to the database.
// If you need to set the default connection charset because your database
// is using a charset other than latin1, you can set the charset here.
// If you don't set the charset to be the same as your database, you
// may receive collation errors.  Ignore this setting unless you
// are sure you need to use it.
// $config['Mysqli']['charset'] = 'utf8';

6) Also make sure your database collations are appropriate and consistent throughout the entire database. You need to use program like phpmyadmin to view your collations:

http://www.phpmyadmin.net/home_page/index.php

When you click your database name in phpmyadmin it will list all tables, their collations, as well as the collation of the database itself at the bottom. And when you click the name of a table on the left it will list the collations of individual fields within that table.

1) To edit the collation of the database itself you need to click the database name on the left and then click "Operations" on the top.

2) To edit the collation of an individual table you need to click its name on the left and then click "Operations" on the top.

3) To edit the collation of an individual field within a table you need to click the table name on the left and then click the edit image (a little pencil icon) for that field.

_____
7)  If there was a database move involved then you might need to specify the character set when making the dump. This guide shows how:

http://wiki.refbase.net/index.php/Troubleshooting

Note their example:

mysqldump refbase -u root -p --opt --default-character-set=latin1 > refbase.sql

Tag Cloud

My Websites

Categories

Archives