Previous Thread
Next Thread
Print Thread
Rating: 5
Page 1 of 2 1 2
#214277 03/12/2002 9:39 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I don't know anything about PHP, but I'm wondering how simple it is to make a page on my site that:
- uses the threads header
- has the little menu bar (possibly alert for PMs)
- can contain JavaScript code in the middle for a chatroom

Thus the page has the same look, feel and options as the rest of the site...and the user appears in "Who's Online" as "in the Chatroom" or something like that.

How easy might this be for a novice? Or is it just a page with some sort of "include $header" sort of instruction then the JavaScript for the chatroom...or can you NOT use JavaScript stuff in a "threads" PHP Page?

Sponsored Links
Daine #214278 03/12/2002 10:09 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
JustDave can answer you better, but it sounds like you could use a copy of the integrated index page and replace some of the calls with the chat stuff you wanna add.


- Allen wavey
- What Drives You?
SurfMinister #214279 03/12/2002 10:41 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Thanks -
I tried that... but as usual. It wasn't pretty. The errors start when it hits the chatroom code.

Here's what I need inserted into the page (it's not exactly HTML, so I'm not sure that it'll work):

<!-- PRO 3 APPLET CODE START (c)2001 Chat-Forum.com -->

<APPLET CODE="Forum.class" CODEBASE="http://pro.chat-forum.com/pro3/ME001/"

width="468" height="280" ARCHIVE="Forum.jar" BORDER=2>

<PARAM NAME="RegCode" VALUE="94642331446">

<PARAM NAME="Title" VALUE="CHATROOM">

<PARAM NAME="Background" VALUE="#3366FF">

<PARAM NAME="Foreground" VALUE="#FFFFFF">

<PARAM NAME="Action1" VALUE="Will Be Right Back">

<PARAM NAME="Action2" VALUE="Giggles">

<PARAM NAME="Action3" VALUE="Laughs Out Loud">

<PARAM NAME="Action4" VALUE="Falls Asleep">

<PARAM NAME="Action5" VALUE="Waves To The Room">

<PARAM NAME="Action6" VALUE="Starts To Cry">

<PARAM NAME="Action7" VALUE="Looks Around">

<PARAM NAME="Action8" VALUE="Smiles Sweetly">

<PARAM NAME="Action9" VALUE="Grins Evily">

<PARAM NAME="Action10" VALUE="Starts To Panic">

<!-- DO NOT CHANGE! --> <!-- YOU MAY ONLY CHANGE THE SETTINGS BELOW.. --> <!-- Forum Title MAx 40 Chars -->

<!-- BG color, format = #xxxxxx RGB --> <!-- FG color, format = #xxxxxx RGB -->

<!-- Actions Max 40 chars -->

</APPLET><!-- PRO 3 APPLET CODE END -->


Daine #214280 03/13/2002 5:39 AM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
It's actualy not that hard at all. On my main site http://www.chattersonline.com ever single page uses the threads for header/footer and auth. I'll put together an example and post it later today. []/forum/images/icons/smile.gif[/]

sjsaunders #214281 03/13/2002 8:54 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
You're a gem! No hurry.

Sponsored Links
Daine #214282 03/14/2002 12:54 PM
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
I actually have the exact thing you're asking for running on my site at: http://www.terranbbs.com/chat2.php

Give me an email address and I'll send the page to you. You should be able to replace the "quickchat" java code I have with your code and everything will work fine. Make sure you put the page in your UBBThreads installation directory so that it reads everything o.k. []/forum/images/icons/smile.gif[/]

Note: My page looks a little different from the norm because I'm running Allen's compact headers hack. I can edit the file I send you to work for your site if you don't have that installed.

SDS #214283 03/14/2002 2:09 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Cool board.
That's exactly what I'm looking for. I'm not using the compact headers though.

My email is [][email protected][/]

Do you know, if you edit the online.php in the language files can you make "who's online" show "in the chatroom" or something similar?
Couldn't tell on your site...maybe noone was in the chatroom when I was there.

Thanks!

Daine #214284 03/15/2002 12:20 AM
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Thanks!

Most everyone uses mIRC to access our chat room, but I have modified the online.php file in /languages to say "In the Chat Room". The specific line of code is:

$ubbt_lang['chat']  = 	"In the chat room";
I've emailed you the file and I removed the two lines for the compact headers hack. You'll just need to replace the section that starts with:

<p align="center"><br><center>
and ends with:

<a href="http://www.quickchat.org/"> <img src="http://images.quickchat.org/...
Let me know if you have any questions. []/forum/images/icons/smile.gif[/]

SDS #214285 03/15/2002 7:32 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Thanks! That's exactly what I was looking for.
Found a few more uses for the basic page as well. And if you add to the online.php for each new page... it really helps integrate the site together!

Thanks for your help!

Daine #214286 03/16/2002 9:48 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Hey my email is [][email protected][/] can you sent me those modification as well so I can spice up my chat.

Sponsored Links
sf49rminer #214287 03/17/2002 4:38 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
question here as my chat seems to work with a html file like I had before but it loads fine with this new chat.php but never connects?

<?
/*
# UBBThreads, Version 5
# Official Release Date for UBBThreads Version5: December 12, 2000.

# First version of UBBThreads created July 30, 1996 (by Rick Baker).
# This entire program is copyright Infopop Corporation, 2001.
# For more info on the UBBThreads and other Infopop
# Products/Services, visit: http://www.infopop.com

# Program Author: Rick Baker.

# You may not distribute this program in any manner, modified or otherwise,
# without the express, written written consent from Infopop Corporation.

# Note: if you modify ANY code within UBBThreads, we at Infopop Corporation
# cannot offer you support-- thus modify at your own peril []/forum/images/icons/smile.gif[/]
# ---------------------------------------------------------------------------
*/


// Require the library
require ("/main.inc.php");
$user[U_Username] = $w3t_myname;
$user[U_Password] = $w3t_mypass;

// ---------------------
// Send the page to them
$html = new html;
$html -> send_header("The Chat Room",$Cat,0,0,0,0,$user);

$html -> table_header("The Chat Room");

$phpurl = $config[phpurl];

$html -> open_table();
echo "
<tr class="darktable">
<td>
<p align="center"><br><center>
<applet archive="/chat/jirc_nss.zip" code=Chat.class
width=600 height=320 >
<param name="CABBASE$" value="/chat/jirc_mss.cab">
<param name="ServerPort" value="6667">
<param name="TotalServersAllow" value="4">
<param name="TotalChannelsAllow" value="1">
<param name="ServerName1" value="irc.dal.net">
<param name="ServerName2" value="fork.ca.us.dal.net">
<param name="ServerName3" value="phoenix.ga.us.dal.net">
<param name="ServerName4" value="sodre.on.ca.dal.net">
<param name="Channel1" value="ReefTalk">
<param name="AllowURL" value="true">
<param name="AllowIdentd" value="true">
<param name="WelcomeMessage" value="Welcome to ReefTalk chat!">
<param name="RealName" value="ReefTalk Chat">
<param name="DisplayConfigChannel" value="true">
<param name="DisplayConfigChannelPass" value="false">
<param name="DisplayConfigMisc" value="true">
<param name="DisplayConfigNick" value="true">
<param name="DisplayConfigNickPass" value="false">
<param name="DisplayConfigPort" value="true">
<param name="DisplayConfigRealName" value="true">
<param name="DisplayConfigServer" value="true">
<param name="DisplayConfigServerPass" value="false">
<param name="LogoHeight" value="90">
<param name="FieldNameConnected" value="Connected, please wait...">
<param name="FieldNameConnecting" value="Connecting to server...">
<param name="FieldNameConnectionClose" value="Connection closed.">
<param name="FieldNamePrivateChatTitle" value="Chat with:">
<param name="FieldNamePrivateClose" value="Close">
<param name="FieldNameQuitMsg" value="Leaving">
<param name="isLimitedServers" value="true">
<param name="isLimitedChannels" value="true">
<param name="BackgroundColor" value="99,132,181">
<param name="TextColor" value="black">
<param name="TextScreenColor" value="white">
<param name="ListTextColor" value="blue">
<param name="TextFontName" value="Arial">
<param name="TextFontSize" value="12">
<param name="LogoBgColor" value="white">
<param name="BorderVsp" value="5">
<param name="DirectStart" value="false">
<param name="FGColor" value="black">
<param name="InputTextColor" value="black">
<param name="InputScreenColor" value="white">
<param name="TitleBackgroundColor" value="black">
<param name="TitleForegroundColor" value="white">
<param name="IgnoreLevel" value="3">
</applet>
<br>
<a href="http://www.reeftalk.com/ubbthreads/">Back to the Board!!</a> </center></font></p>

";

$html -> close_table();
// -------------
// Send a footer
$html -> send_footer();

anyone see anything wrong?

sf49rminer #214288 03/19/2002 8:39 AM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Okay I started from scratch and got it working. I have another question?

How can I get Jpilot to automaticallly recognize the users board name so I can set my chat back to start automatically instead of going to a config window where they have to input their name?

Daine #214289 07/09/2002 7:58 AM
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
Hmmm... Odd, cause I replied to this thread this morning and the post isn't here...

I'd like to set up my index page to use the Threads header and footer, as well as the Status window that's on the index of this web site.

It would also be cool to use the default style sheet, or whatever the user has selected in their profile.

Any assistance in setting this up would be greatly appreciated!

jacksonm99 #214290 07/09/2002 8:24 AM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I'll put something together today and post it for you.

sjsaunders #214291 07/09/2002 12:48 PM
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
posted by JustDave:
I'll put something together today and post it for you.


THANKS!!!

jacksonm99 #214292 07/09/2002 4:36 PM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I had this posted once but took it down to add information about setting the path to include .threads' main.inc.php file.

Here it is again. Hope it's what you wanted.
Attachments
52246-basicpage.zip (0 Bytes, 16 downloads)

sjsaunders #214293 07/10/2002 12:12 AM
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
That's exactly what I wanted, thanks!

Two questions:

1) If a user has selected a specific CSS in their profile, will it be used to control the properties of the html tags in the basic page (I'm hoping yes)?

2) If I wanted to use parts of your IIP hack could I insert them anywhere after the main.inc.php file / user info is aquired? I really like your IIP work, but I don't want to change the layout of my web site, nor do I need every "modual" that you wrote for IIP. So I'd like to pick and choose what I want to display on my site. I know, picky picky...

jacksonm99 #214294 07/10/2002 12:27 AM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
1. Some css properties will carry over to properties set on specific tags. Custom property classes can only be accessed by placing the class="somestylename" into the tags themselves. Properties set for the BODY tag will affect the entire body of the page. The same will go for other tags such as <table>, <p>, <b> and all others.

2. It may be possible with a lot of work. (depending on the pal box of course)

Hope that helps.

sjsaunders #214295 07/10/2002 1:03 AM
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
I understand how CSS works, just wasn't sure if the user's preferences were being querried in the basic page script that you posted (PHP does so much "in the background" that simple instructions are sometimes difficult to decipher for a newbie like myself).

The staus box is the only one I'd like to implement now, since I think it would be cool for users to hit my index page and be able to see if they had any new private messages.

Thanks for the script and for taking the time to answer my questions!

jacksonm99 #214296 07/10/2002 1:04 AM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Your welcome

sjsaunders #214297 07/10/2002 3:48 PM
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
I've been testing the script that you gave me, and it does work. The problem is when I try to use any additional php scripting between

<!-- BASIC PAGE START -->

and

<!-- BASIC PAGE END -->

I figured out what I was doing wrong (no need to declare $html more than once, no need to require main.inc.php more than once. This is what I have so far:

Test Index

The only problem now is that there doesn't seem to be any access to cookie information cause when I go to the test index I'm not automaticly logged in.

I aslo haven't been able to get it to work in a .shtml file as a server side include (not sure if it's possible, and not a setback).

More hackin'

jacksonm99 #214298 07/10/2002 9:50 PM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Everything between the html comments is for html only. There is no php parsing done. If your going to add php code you will need to add it before the first ?> closing.

sjsaunders #214299 07/10/2002 11:49 PM
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
posted by JustDave:
Everything between the html comments is for html only. There is no php parsing done. If your going to add php code you will need to add it before the first ?> closing.


I did it just by going back into php by using <? Later I can change the script so that I'm not going in and out of php, but for now it helps to keeps things separate while I squash all the bugs.

Either you think I'm a total newbie at this sort of thing, or I'm not phrasing my responses to you very well...

jacksonm99 #214300 07/11/2002 7:51 AM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Going in and out of php isn't a bad thing, in fact, the regular html will be displayed faster as php does not have to parse it. Also, the same thing holds true for echo statements with single quotes, example: echo 'your html here'; but there will be no variable value replacements in single quoted strings so if your only wanting to send html to the screen with no php variables present you should use the single quotes in an echo statement.

Hope that helps some.

sjsaunders #214301 07/11/2002 8:04 AM
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
Not exactly. In the area where you put the "insert html here" I needed to plug in some more php scripting, specificly the news posting script that comes with Threads that I hacked. Unfortunately the news posting script requires main.inc.php, and requiring it twice in the same script (after cutting and pasting it into the basic page that you posted) was causing problems.

So, I just used the <? tag to go back into "php mode" in the area that you designated for html. No big deal, cause it's just a test page that I'm hacking on. The end result was the test page that I linked two a few posts ago. I can always go back and clean up the tags in the final script.

Later I'll turn the code that you gave me into two php includes and call them on every page on my web site that needs them (like a server side include). I just have to remember to remove any duplicate require statements.

I was looking at the IIP scripting today and noticed how you are authenticating users. Is that all that is needed to get the info for the status and login pal that you wrote?

Thanks!

jacksonm99 #214302 07/11/2002 8:10 AM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
As far as I recall yes, only authentication retrieving the basics is needed.

sjsaunders #214303 07/11/2002 8:13 AM
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
Thanks for all your help!!!

sjsaunders #214304 07/11/2002 3:13 PM
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
Here is what I have so far:

Test web site

The actual page looks like this:

<?
include "header.php";

include "news-forum.php";

include "footer.php";

?>

Which is exactly what I wanted, except I'm not authenticating to Threads. Here is what I have for the authentication portion:

$userob = new user;
$user = $userob -> authenticate("U_Username, U_Password, U_Display, U_Groups, U_Sort, U_View, U_PostsPer, U_TempRead, U_FlatPosts, U_TimeOffset, U_ActiveThread, U_Post_Format, U_PicturePosts, U_ShowSigs, U_Email, U_PictureView");

What am I missing?

Thanks in advance for any help!

jacksonm99 #214305 07/11/2002 5:29 PM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Authentication with an empty string should be all that is needed unless your after more than the basic information of a user.

This code:

$userob = new user;
$user = $userob -> authenticate("");

Will return Username, Password, SessionID, StyleSheet, Status, # New Privates and Front Page prefs.

If you need other information you can add as needed to the authentication call.


sjsaunders #214306 07/14/2002 1:02 PM
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
posted by JustDave:
Authentication with an empty string should be all that is needed unless your after more than the basic information of a user.

This code:

$userob = new user;
$user = $userob -> authenticate("");

Will return Username, Password, SessionID, StyleSheet, Status, # New Privates and Front Page prefs.

If you need other information you can add as needed to the authentication call.




Thanks! The problem is that I'm not automaticly logged in when I hit the page. I can tell I'm not logged in cause I don't have "Admin" in the menu. How can I get a registered user to automaticly authenticate to the index page?

jacksonm99 #214307 07/14/2002 2:20 PM
Joined: Jun 2001
Posts: 176
Member
Member
Offline
Joined: Jun 2001
Posts: 176
add this
code:
// Get the user info

$Username = $w3t_myname;

$Password = $w3t_mypass;


interforos #214308 07/14/2002 3:04 PM
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
No joy

This is what I'm doing:

require ("{$PathToThreads}main.inc.php");
// Get the user info
$Username = $w3t_myname;
$Password = $w3t_mypass;
$userob = new user;
$user = $userob -> authenticate("");

I'm sure it's wrong cause it's having no effect.

jacksonm99 #214309 07/14/2002 8:50 PM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
posted by Dalantech:

Thanks! The problem is that I'm not automaticly logged in when I hit the page. I can tell I'm not logged in cause I don't have "Admin" in the menu. How can I get a registered user to automaticly authenticate to the index page?


Are your cookies set site wide? The cookie path in your configure file for .threads should = "/"


sjsaunders #214310 07/15/2002 12:12 PM
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
I got it working! Thanks for all your help!

Test page

jacksonm99 #214311 07/15/2002 1:10 PM
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
I spoke too soon...

I managed to log in one time and get the status window (using the loginpal.php file) but after logging out I can't log back in. I've already se the cookies path to /

More hackin'...

jacksonm99 #214312 07/16/2002 11:00 AM
Joined: Jun 2001
Posts: 176
Member
Member
Offline
Joined: Jun 2001
Posts: 176
hey trust me it's working but you have not included a language file LOL
code:

// SET THIS TO THE TITLE OF THIS PAGE
$BasicTitle = "DBY_Gallery";

// Get the user info
$Username = $w3t_myname;
$Password = $w3t_mypass;

require ("{$PathToThreads}main.inc.php");
require ("languages/$lang[THIS_FILE]/ubbthreads.php");
$userob = new user;
$user = $userob -> authenticate("");


please point the language file to ubbthreads.php
or make your own using the same format

Last edited by Dslam; 07/16/2002 11:06 AM.
interforos #214313 07/16/2002 12:06 PM
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
I tried mutlipe ways of using your instructions, but none of them worked

Thanks for trying to help!

jacksonm99 #214314 07/16/2002 4:27 PM
Joined: Jun 2001
Posts: 176
Member
Member
Offline
Joined: Jun 2001
Posts: 176
ok then are you runing version 6.02 ? if so the login is a bit different I think

interforos #214315 07/16/2002 4:29 PM
Joined: Jun 2001
Posts: 176
Member
Member
Offline
Joined: Jun 2001
Posts: 176
blah my bad your want to be logged in automatic humm you got me
if your cookiepath is set to site wide it should work

interforos #214316 07/17/2002 2:12 AM
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
posted by Dslam:
blah my bad your want to be logged in automatic humm you got me
if your cookiepath is set to site wide it should work


Yup, that's what I'm trying to do and it's almost driving me to therapy

I even tried using the script that ubbthreads.php uses and it didn't work. Cookies are set site wide, but I'm not the only one on the server so I may have to set it to my web root directory. More hackin'...

Page 1 of 2 1 2

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 808
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240430)