PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old August 3rd, 2002, 10:04 AM
Mustafa Karaoglu Mustafa Karaoglu is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Adana - Turkey
Posts: 39 Mustafa Karaoglu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to Mustafa Karaoglu Send a message via AIM to Mustafa Karaoglu Send a message via Yahoo to Mustafa Karaoglu
pop up window for specific user as in live suppurt scripts

is it possible to pop a window for to welcome a user or to say something to him / her

Reply With Quote
  #2  
Old August 3rd, 2002, 05:12 PM
sethadam1 sethadam1 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Orlando, FL
Posts: 223 sethadam1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: pop up window for specific user as in live suppurt scripts

Oh, it's soooo easy....try this (untested, but should work...)

php Code:
Original - php Code
  1.  
  2. <html><head>
  3. <script language=javascript>
  4. username = prompt("Give me your name, buddy.", "")
  5.  
  6. function brandNew()
  7. {
  8. var popup=window.open("", "popupwin", config='height=270,width=250,toolbar=no,location=n  o,directories=no,menubar=no,resizeable=no,status=n  o')
  9. popup.document.write("<html>")
  10. popup.document.write("<title>Pop Up Window!</title>")
  11. popup.document.write("<body bgcolor='ffffcc'>")
  12. popup.document.write("<center>")
  13. popup.document.write("<font size=5 color='maroon'>")
  14. popup.document.write("Welcome back to Poop.com, " + username + "!")
  15. popup.document.write("<br>")
  16. popup.document.write("<font size=2 color='black'>")
  17. popup.document.write("Please let us know you were here...")
  18. popup.document.write("<br>")
  19. popup.document.write("<form method='post' action='processor.php'>")
  20. popup.document.write("Name: &nbsp;<input name='name' type='text' length='20' maxlength='30'><br>")
  21. popup.document.write("E-mail: &nbsp;<input name='address' type='text' length='20' maxlength='30'>")
  22. popup.document.write("<p><input type='submit' value='submit'>")
  23. popup.document.write("</form><br>")
  24. popup.document.write("<center>")
  25. popup.document.write("<form><input type='button' value='Close Window' onClick='self.close()'><p></form>")
  26. popup.document.write("</html>")
  27. }
  28.  
  29. </script></head>
  30.  
  31. <body>
  32. <imsrc="/pathtoimagesimages/image.gif" onClick="javascript:brandNew()" alt="click here to launch popup!">
  33.  
  34. </body>
  35. <html>


Reply With Quote
  #3  
Old August 3rd, 2002, 05:20 PM
Mustafa Karaoglu Mustafa Karaoglu is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Adana - Turkey
Posts: 39 Mustafa Karaoglu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to Mustafa Karaoglu Send a message via AIM to Mustafa Karaoglu Send a message via Yahoo to Mustafa Karaoglu
RE: pop up window for specific user as in live suppurt scripts

No, I mean, suppose there are five people surfing your site and you see them online. so you want to talk to one of them, maybe, clicking on their name or ip etc you activate a window on the user computer/screen
This is what I ask for
Thanks

Reply With Quote
  #4  
Old August 3rd, 2002, 10:07 PM
cjrobs cjrobs is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Southampton, England
Posts: 121 cjrobs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to cjrobs
RE: pop up window for specific user as in live suppurt scripts

If you make a SQL Table with the following fields:
id,ip,msgon,timestamp,message

Whenever someone comes onto your site, their IP & a timestamp are added/updated in the table (i.e if the IP is already in the table, it just updates the timestamp). It also checks the table with a query like the following: SELECT * FROM tablename WHERE ip = '$REMOTE_ADDR' && msgon = '1';

If that query returns no rows, then there are no messages for that user. If the query returns one row... then the following happens:

php Code:
Original - php Code
  1.  
  2. $data_from_table = mysql_fetch_array($result_from_query);
  3. echo('<SCRIPT LANGUAGE="JavaScript">');
  4. echo("alert('$data_from_table[message]');");
  5. echo('</SCRIPT>');
  6. mysql_query("UPDATE tablename SET msgon = '0' WHERE ip = '$REMOTE_ADDR';");
  7. mysql_query("UPDATE tablename SET message = '' WHERE ip = '$REMOTE_ADDR';");


So... for Mr.Big behind the scenes, if they see someone they know come onto the site... all they need to do is go into the table and change the entry for this person... setting msgon to 1 and entering the message into the message field. That message will then pop up the next time that user loads the page, and then delete itself from the DB to stop it popping up again.

Reply With Quote
  #5  
Old August 3rd, 2002, 11:45 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: pop up window for specific user as in live suppurt scripts

What I am trying to say is exactlythe reverse of live support scripts. When user clicked "live online" link a windows open and connect to admin/support. admin see the user and answer him.
What ı waant is the reverse of this. admin sees the user and write a message and when he submitted message a new window opened on the screen of specific user.
That is also like one-on-one sessions on java chat... I think I managed to tell myself :-) this time
Mustafa

Reply With Quote
  #6  
Old August 4th, 2002, 07:54 PM
cjrobs cjrobs is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Southampton, England
Posts: 121 cjrobs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to cjrobs
RE: pop up window for specific user as in live suppurt scripts

So does the user need to reply to this message as well?

Reply With Quote
  #7  
Old August 5th, 2002, 09:55 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: pop up window for specific user as in live suppurt scripts

YEPPP, certainly

Reply With Quote
  #8  
Old August 5th, 2002, 08:02 PM
cjrobs cjrobs is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Southampton, England
Posts: 121 cjrobs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to cjrobs
RE: pop up window for specific user as in live suppurt scripts

ahh...

using the same idea as i said earlier... you'll need to open a JavaScript window...

var popup=window.open("livesupport.php", "popupwin", config='height=270,width=250,toolbar=no,location=n o,directories=no,menubar=no,resizeable=no,status=n o')

and create a page called popup.php, which contains the code from the php chat thing i saw in one of the code examples on this site.

That way, when the admin wishes to talk to the user... they change msgon to 1 in the db, on that users entry... and then talk to them using the chat script.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > pop up window for specific user as in live suppurt scripts


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway