TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 790
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online

FlashChat User

Started by Sakuragi, November 01, 2005, 07:24:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gerrymo

Yes you can do that, or do as I did and make it a popup from a button (looks much tider than a new window)

technodragon73

true, but the problem i have is i am not really familiar with coding so i wanted to know what was the code you used to accomplish that.

Eternity

#12
Quote from: technodragon73 on January 18, 2006, 11:56:42 PM
true, but the problem i have is i am not really familiar with coding so i wanted to know what was the code you used to accomplish that.

hmm its a while since I installed smf and flash chat for someone on a forum and I have only done it once.  All you do is insert target as follows after your url reference to the chat in your index.template page with the target="_blank" code

Find this

echo '<a href="', $GLOBALS['boardurl'], '/chat/flashchat.php">',

and replace with this :

echo '<a href="', $GLOBALS['boardurl'], '/chat/flashchat.php" target="_blank">',

That should open it in a new window.






technodragon73

HOORAY!

That was such a simple fix!

Ok, so is there a way to add defining the size of the window in the popup?

Or does it have to popup full screen?

IchBin

I think something like this might work. Of course changing your dimensions...
<a href="http://www.yourlink.com" onclick="window.open(this.href, 'popupwindow', 'width=500,height=500,scrollbars,resizable'); return false;">Chat</a>

technodragon73

ok...call me stupid...how do i integrate that inot the index.template.php?

i have tried several different ways and i keep getting a parse error

Eternity

#16
Quote from: IchBinâââ,¬Å¾Ã,¢ on January 19, 2006, 01:01:57 AM
I think something like this might work. Of course changing your dimensions...
<a href="http://www.yourlink.com" onclick="window.open(this.href, 'popupwindow', 'width=500,height=500,scrollbars,resizable'); return false;">Chat</a>

Ichbin to be honest I haven't touched javascript much and this is javascript isn't it? If it is wouldn't they have to place a script arguments in the header or something for it to work?  Or put in script tags at the beginning and end of the actual entry in the line above.


IchBin

Actually no, because you are not calling a function from the header. This is javascript that is what I call stand alone code. But to echo it in a php statment with HTML you would actually have to write it out like this.

<a href="http://www.google.com" onclick="window.open(this.href, &quot;popupwindow&quot;, &quot;width=500,height=500,scrollbars,resizable&quot;); return false;">Google</a>';

Eternity

#18
Quote from: IchBinâââ,¬Å¾Ã,¢ on January 19, 2006, 03:52:59 PM
Actually no, because you are not calling a function from the header. This is javascript that is what I call stand alone code. But to echo it in a php statment with HTML you would actually have to write it out like this.

Google</a>';

Really thats good so how would they insert it into the index.template file?  Would it be something like this

Find this

echo '<a href="', $GLOBALS['boardurl'], '/chat/flashchat.php">',

and replace with this :

echo '<a href="', $GLOBALS['boardurl'],
onclick="window.open(/chat/flashchat.php, 'popupwindow', 'width=500,height=500,scrollbars,resizable'); return false;'">',




IchBin

No, it would be like this. Make sure you click and highlite to the right. I just noticed in the blue101 theme that the BBC Code tags are not showing a scrollbar. It might be in other themes I am not sure.
echo'<a href="http://www.yourdomain.com/chat/flashchat.php" onclick="window.open(this.href, &quot;popupwindow&quot;, &quot;width=500,height=500,scrollbars,resizable&quot;); return false;">Chat</a>';

This website is proudly hosted on Crocweb Cloud Website Hosting.