Forum Moderators: coopster

Message Too Old, No Replies

specify a window width with php.

         

psychophage

8:50 am on Apr 4, 2004 (gmt 0)

10+ Year Member



Hello everybody!
Maybe this will seem to be a basic topic, for you, but I'm brand new about php...
Somebody made a wonderful guestbook for my website, something great with flash and php ( the GB, not the website, lol! ), but I have only one problem with this....
The GB messages are loaded in a flash window, which is quite small ( maybe a width of only 500 px ), so all the messages are truncated....
Do you have a solution about that?
Can I specify a width for the loadsigned page, so that the messages would go on two lines, instead of one very long line?
I don't know if I was very clear with that, sorry...
Anyway, here is the link to my GB, so that you can see what I mean....

thanks for your help!
Psycho

[edited by: jatar_k at 4:40 pm (utc) on April 4, 2004]
[edit reason] removed url [/edit]

henry0

12:31 pm on Apr 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Psycophage
I do not think the window needs to be enlarged
if I follow your reasoning you want to add on the widht to allow for reading the whole message
now imagine a 80 words message.. you will need two monitors to display it

than anser is in the php code not the flash

BTW
It is against our rules to post a personal site link

FR: Desole, c’est la facon de proceder que nous avons tous adopte sur ce forum

psychophage

2:52 pm on Apr 4, 2004 (gmt 0)

10+ Year Member



Henry, I'm sorry about the personnal link, it's not even my work, so it wasn't meant as a way to show what I'm doing...
It was just meant to show what I was trying to explain ( very badly, I must admit ).
Of course not, I don't want to enlarge the window to show the whole message, I want to diminish the size, so that the message is displayed on two lines, instead of only one line. I want the window size to be less than 500px, and I don't know how to do that with php, or even if it's possible to do it...
The problem is : the flash display window is only 500px, and the php loadsigned page is a normal page, that means, as big as your monitor resolution is... And I want it to have an absolute width of 480 px or so.
In my flash window, I have the " . urlencode($listSigned) . " thing, and I don't know if it's here that I should specify the window's width or not....
Please, give me some hints about that. Sorry if I "broke the rules of the forum" with my link, but I really didn't know people would care...
thanks!

henry0

4:43 pm on Apr 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Don't be so sorry
we have all done the same :)
main reason being: unwanted MKTG and SPAM hiden in make believe
of course not your profile!

My flash knowledge is very much close to zero

I believe that only the PHP part of it causes the problem

is there a limit in text display?
We should look at the PHP script section that displays the text
Are you using flat files or a DB

Could you ask your friend about its design
if the code comments are in FR
I will do the translation for other members to look at

thanks
<Henry's edit: typo>

psychophage

6:49 pm on Apr 4, 2004 (gmt 0)

10+ Year Member



Hi Henry!
What do you mean about my friend's design?
If you want, I have the whole flash file. I also have the php files. Just tell me exactly what you need.
My text was limited to 255 char, but I decided to limit it to 65000 ( using the "text" instead of "text-area" var, in the sql database. Lots of people are writings tons of things, and their message was truncated everytime, that's why I made the correction. Actually, I had the problem with the flash window not showing the whole message even before that...
All the comments on the files are in english, because the girl who made the design comes from the States, so you won't need to translate anything :)
Does that break the rules if I put a link to download the files?

henry0

8:34 pm on Apr 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,
Good question
I don't have the answer
send a sticky mail to jatar_k the forum admin.

if you wish you may zip the whole thing
and send me the package through our forum email system

Problem:
I wil be away from my machines for about 36 hours

I mentioned to post only the PHP script section that regards the output so every one may look at it which is the forum purpose

If you do not know which one does the job
I will try to find it and post it (from your zip file)
in order for all to look at your problem

psychophage

7:25 am on Apr 5, 2004 (gmt 0)

10+ Year Member



hey, thanks a lot, Henry!
I'll send you the zip file....
Just one thing : the script must not be distributed, as it's the copyright work from somebody... ( not me ).

henry0

11:32 am on Apr 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Indeed!
no problems here.

Henry

henry0

11:28 am on Apr 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,
As far as I can say nothing is hard coded it seems to be originated from a script pertaining to "Hot Scripts"

The PHP part is quite straightforward

And the WSF file is not attached
After looking at the guest book I reverse my thoughts and guess (I know one should not guess!) that the flash part is the reason for your text display problem

You might want posting the same question in a another forum than the PHP one.

Here is the small code section concerned

<<<<
/* For each table entry returned... */
while($row = mysql_fetch_array($result)) {

/* Create human readable date from timestamp */
$entryDate = strftime("%A %d/%m/%y", $row['entryDate']);

/* Add details to output variable */
print "<b>Date:</b> " . $entryDate . "<br>";
print "<b>Name:</b> " . $row['name'] . "<br>";
print "<b>Email:</b> " . $row['email'] . "<br>";
print "<b>Location:</b> " . $row['location'] . "<br>";
print "<b>Gender:</b> " . $row['gender'] . "<br>";
print "<b>Comments:</b> " . $row['comment'] . "<br><br>";

/* Close link to MySQL */
mysql_close($link);

?>
>>>>

psychophage

8:03 pm on Apr 6, 2004 (gmt 0)

10+ Year Member



so what do you suggest?
Do you think I could include some javascript inside? ( and if yes, where? ), or should I find a way for Flash to do it?

henry0

8:50 pm on Apr 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well
I would create a new thread in
<<
Site Graphics and Multimedia Design
>>

And expect for a Flash answer
mention that we looked at from the PHP side
and that the PHP script seems not to be at fault

unless someone here has another idea?

good luck