Administrators · Legacy archive
Ancient Gamer's Citadel Ideas, tasks and stuff
-
Ancient Gamer's Citadel Ideas, tasks and stuff
#1While I wait for me to once again enter tech mode, I keep ideas and such in this thread.
Random ideas:
-User statistics which yield insight into such things as thread popularity, long term user interest, and so on and so forth
Tasks:
-Chat interaction
Other:
-Manfred's Big List Quest
Strolen Quotes
20:14:51 Cache system, friendly urls (content/Title instead of content.php?node=Title), um there is the insanities thing I haven't started.
20:16:15 Still need the email system however we decide to do that.
20:19:48 Oh yeah, thank you. RSS is another one. I just started reading on that and it isn't that hard all said, the hard part is trying to decide what information and what kind of feeds to provide. You are welcome to that one too.
20:21:25 That is another one actually, the links. I want that coded from the ground up to specialize in the links we like and a way to find a link we want.
20:22:11 Links is a huge one actually. My hope is for that to be another main attraction for the site. There are few sites that have a good comprehensive category system of links in a way that you can actually find what you are looking for. -
Ancient Gamer's Citadel Ideas, tasks and stuff
#202:58:26 * manfred suggests thoughts of the Big List to Ancient Gamer
03:02:37 [Ancient_Gamer] In my mind I have this schedule: Chapter 1, big list, Chat interaction scripting, Chapter 2 -
Ancient Gamer's Citadel Ideas, tasks and stuff
#317:56:28 AG we need these sprites for the chat!
17:56:37 http://www.fantasyanime.com/squaresoft/bahamut_sprites.htm -
Ancient Gamer's Citadel Ideas, tasks and stuff
#4I am really not in a programming mode... I have programmed non-stop these last 10 years (and on and off since 1986) and I think I have hit a wall or something...
I have discovered pleasure in graphic work and might create a design layout for the Coldforged section which I will try out on ancient.rpgcitadel.com to showcase it to Strolen...
Design rulez! -
Ancient Gamer's Citadel Ideas, tasks and stuff
#5Yeah, a theme. I need themes. I got Kate working on some colors and stuff to at least get something that is different from the original. I like it, and will be the default, but I am ready for a change of scenery...plus something that isn't as obvious that I can browse at work ;) Hence the plain white one. -
Ancient Gamer's Citadel Ideas, tasks and stuff
#6I actually like the plain white one :o
I have been thinking about design though. The current design was great for a long time though I must admit... A new one would actually be welcome.
I am going to tweak the code so that when you enter the CF section the winged diplodocus and the citadel will be changed with a real dragon and Coldforged's Unkaralth Citadel :)
Right now I like Bethesda's dirty white on the cover of oblivion... Dirty white is kewl!
-
Ancient Gamer's Citadel Ideas, tasks and stuff
#7Que onde, Jugador Viejo.
Actually, that's probably bad Spanish... "Viejo" means "old", not "ancient". ;) -
Ancient Gamer's Citadel Ideas, tasks and stuff
#8Well, I had to use an english-portuguese translator to translate Jugador :p
Anyways. recently I have had a few balls in the air:
-I Started my a company with two friends only to discover that I really should start alone, and then offer my services to my friends...
-I have been applying for jobs. I am being evaluated by the Age of Conan team, though the competition is pretty hard. Statistically I have a 5% chance of getting the job.
-I have joined a climbing club. We scale stuff.
-I have begun a rigorous training routine, to remove my... eh... computer caused excessive padding.
-I also have a part time job.
-And a SO + 2 children
-Plus a somewhat time consuming forum game that I am trying to reach the end of, so that I can pause it until the holidays.
Sooooo that is why I have been neglecting you guys :) I hate to do that. Anyway, my time is somewhat less occupied at the moment and I have decided to work more on the chat issue.
-I have installed Apache 2 with PHP 4.4.0 and MySQL 4 locally.
-Testing of Flashchat combined with PHPMyChat has begun.
This is an AG information bulletin. As with all AG messages, take it with a pinch of salt. Do not believe me until the evidence is in front of your eyes, for I have a tendency to lose focus. -
Ancient Gamer's Citadel Ideas, tasks and stuff
#9Well, I have looked through both programs and they have quite different methods of implementing chat functionality. While phpmychat store the messages serverside, easily fetchable when new clients log on, Flashchat utilize javascript and DOM to store messages. I can fix this, but it would require some serious hacking and tweaking.
Is this important enough, and is it a violation of the copyright?
What say you? -
Ancient Gamer's Citadel Ideas, tasks and stuff
#10
The license for FlashChat permits single use only. This means that for web server scripts, such as those using PHP/MySQL/Flash/XML, you can use the software on a single website, and any sub-domains or parked domains of the website. The exception to this are the Flash Components, such as the Datagrid Extensions, which can be used on multiple projects.
You may not re-distribute or re-sell this software under any circumstances. If you are a web service provider with many customers, you can purchase multiple licenses of FlashChat on behalf of your customers, but it should be clear to your users that the software is from TUFaT.com.
You should not take credit for the development of FlashChat, or claim copyright ownership over this software.
If this license description is unclear in any way, just use this rule of thumb: I don't want people to attempt to compete with me on the distribution or sale of these scripts. So, if you're doing something which allows people to get this software without first going through TUFaT.com, then you're probably violating the license.
Please remember that I am a single developer who is strongly dependent on sales from TUFaT.com for my livlihood, and upgrades to these scripts - which you get for free with your purchase - depend on the sales volume. Thus, if a lot of people buy script X, then it's very likely to be upgraded a lot more in the months and years to come, and you'll reap the benefits of these upgrades. I generally put 100% of the income from sales back into development.
Lets look at it this way.
Flashchat. Do we like it? In a perfect world where everybody had any upgraded computer I think it is good but that DOM, for what we do, is somewhat limiting. I very much dislike not having a stable history and/or the ability to walk backwards in a chat just because somebody left.
I can appreciate that it saves bandwidth and load times though, but....
Then we have the old chat, which works pretty good, just doesn't have all the cool bells and whistles, which I don't think we really need anyway. It does everything we need and it is pretty hackable if you want to dig into it.
Then there very well might be another program out there that works even better for us such as IRC integration and such. http://mods.simplemachines.org/index.php?mod=180 or http://mods.simplemachines.org/index.php?mod=60
I have not messed with IRC in years, but we can set-up our own channel to make this work. We have somebody that already offered to grease the wheels to increase the speed of that process.
Then we have the shoutbox that is on each page. I like this and I think a quite a few other people like this too.
Just throwing out the brainstorming. Not sure what to do with it all as I never had a concrete idea on where I specifically wanted the chat to fit in. -
Ancient Gamer's Citadel Ideas, tasks and stuff
#11
Well, I buried the flashchat-phpmychat integration project. Too bad really, because the replacement chat looks gaudy, ill placed and not that interesting. I want to chat in a window dedicated just to the chat and my fellow Strolenites
I still have that server up and running. My old, battered workstation is now filled to the brim with technology: Eclipse 3.1, Visual Studio 6, Apache 2, PHP 4.4, MySQL 4, Photoshop, Macromedia MX Studio 2004... It runs like a dream. I reserve the DirectX tweaking for the high end computer, but for some reason I prefer developing on this old thing here.
Anyway: Seems like I got to find a new focus. Perhaps beta testing is it for a while? My PHP skills are intermediate at best and diving into other peoples' code is never a pleasant task. Hmmmm....
AG out -
Ancient Gamer's Citadel Ideas, tasks and stuff
#12We still do need a chat, that little thing is a temp, although having that incorporated with the 'real' chat would be premium. Then you can chat in the main chat and keep an eye on it while browsing.
That little chat is not meant as a replacement, just as an enhancement. Just need to find something that we like and that we can use. We can probably hack our current phpMyChat to work with smf, just haven't messed with it at all yet. That might be the easiest.
Beta testing would definately be appreciated though, once we go live there will still be new shiny things that we will want to add/improve...chat still being one of them. -
Ancient Gamer's Citadel Ideas, tasks and stuff
#13OK, tried some of those other crappy chat boards and they suck.
Would you be able to figure out how to integrate phpmychat into the smf forums if I installed smf on your test bed?
Would you be willing to play with that?
You could probably get some sound ideas by looking at the phpBB integration and seeing how they did it. smf can't be that different and from what I have seen it is much easier.
smf provides some fancy and easy interfacing that you can probably use through smf_api.php and, if you must, SSI.php but that is a dog.
Just a thought. I will get to it eventually...probably. :-)
phpmychat would be easier to implement with this shoutbox or another that we decide to permanently use. -
Ancient Gamer's Citadel Ideas, tasks and stuff
#14Ok, some questions (I have not begun reading anything yet):
->By integrating smf and phpmychat you mean provide functionality like now? (A link that change colour when users are active on the chat). If that is the case: Definitely, absolutely, yes.
As for the phpmychat and shoutbox... I will have to check how the shoutbox communicates with the DB. That connection will determine the complexity. -
Ancient Gamer's Citadel Ideas, tasks and stuff
#15Yes, all that. That was the problem that there wasn't any in-place instruction on porting it over.
Hey, once you are done if you document how you did it I am certain the community at large would appreciate that since they don't have that smf integration posted yet.
I will see about installing smf on your site, unless you want to go ahead and do it. Happy to do it for ya if you want. -
Ancient Gamer's Citadel Ideas, tasks and stuff
#16Go ahead and install it, but I have one request:
-Could you create a /source folder on the ancient.rpgcitadel root? Within that folder I'd be thankful if you zipped at least the following files:
-SMF and main site files
-shoutbox
-the version of phpmychat you use (I have the newest release at home).
I like to test things locally before doing anything on a remote server, you see :)
As I use mysql 4 and apache 2 + php 4.4 I would also notice any porting difficulties in case you were to swap the site to a newer system. (I already know there are several issues like password problems between mysql 4 and php 4.4. -
Ancient Gamer's Citadel Ideas, tasks and stuff
#17Forgot you had your own test bed.
In that case there is no real need to get the test server working, it is too hard to keep updated anyway with my rapid developement. ;)
As long as you get the current release candidate of smf.
smf_1-1-rc1
http://www.simplemachines.org/download.php
and whatever version of phpmychat you have is fine. One isn't installed and we have to start from scratch with the new one so I will use whatever version you have.
Once the chat integration is done, that is the kicker. My site uses the same smf authentication so it should be seamless for the rest.
The shoutbox, well, ignore it for now because the one I am using is crap. It would only take me changing the database it is calling to make it work with phpmychat's database so no biggie there. -
Mission Accomplished
#18This one was really easy. The fix is not -that- dirty, but I skipped some OOP principles as I did not want to get bogged down with this for too long.
What you need to do:
On line 210, insert these lines of text within the index.template.php file:
$linkID=mysql_pconnect("serverIP", "Username", "Password") or die("Cannot connect to the database\r\n");
mysql_select_db("phpmychat", $linkID) or die("Cannot connect to the database\r\n");
$chatsql=mysql_query("select username from c_users", $linkID);
$numberOfChatUsers=mysql_num_rows($chatsql);
if($numberOfChatUsers==0) $linkColor="#000000";
else $linkColor="#FF0000";
Then you look into the "echo" statement immediately below and locate the following lines:
', $txt['show_unread_replies'], '
then insert:
', $txt['phpmychat1']." ".$numberOfChatUsers." ".$txt['phpmychat2'], '
', $context['current_time']; //Already in the code, but I added it to show exactly where you should put the code snippet above.
Note: If you use a different version of smf or you have altered the index.template.php file already, this text appears on the three lines before 210;
// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '
';
}
Then you got to open a second file and edit that:
Add this wherever it suits you within index.english.php:
$txt['phpmychat1'] = 'There are currently';
$txt['phpmychat2'] = 'users in the chat';
Worked like a charm for me. Remember to fix the URL to the chat, the name of the database, the server IP, the username and the password.
Cheers! -
Ancient Gamer's Citadel Ideas, tasks and stuff
#19Did you use phpMyChat-0.15.0-dev20050206
or the last stable
phpMyChat-0.14.5
?
Does this use the smf logged in information to login to phpmychat? Or do you have to login to chat separate? -
Ancient Gamer's Citadel Ideas, tasks and stuff
#20The above information is SMF code btw. I forgot to mention that.
-phpMyChat 0.14.6-dev
-I did exactly as it is on Strolen's today... That is: You have to log in separate.
You want me to auto-login?
And if so, do you want me to:
a) use two user databases (chat and smf) and then autocreate a chat user when a smf user is created? The chat will then fetch user info from the database when the user logs on (easy, dirty hack).
or
b) use one user database for everything and change the entire code structure of phpmychat (time consuming)?
Oh, no... Wait... You DON'T have to log in twice today... Ooops... My bad.
I will fix this. Unless you tell me otherwise I will use approach a)
Do we still want a splash screen showing who are actually chatting? Might be nice for those DL-Kalabar sessions :o , but then again... Splash Screens ARE pretty damn annoying. Another solution might be an onmouseover label that showed a list of active chatters.
Hmmm.... -
Ancient Gamer's Citadel Ideas, tasks and stuff
#21Yeah, that was the main problem and ALL the integration files and code is missing from the internet. I did find this however.
I found how to combine PHPBB and PHPMyChat when I was setting up my niece’s website this weekend. This is how I did it. This took me several hours to figure out, actually I worked on this sense I got off work Friday and finally finished about an hour ago.
1. Use the same Database for both programs when you install PhpMyChat.
2. Locate the “lib” directory for PhpMyChat.
3. Open each file and change all code that refers to “password” to “user_password” with out the quotes.
4. Locate and open config.lib.php
5. Change define("C_REG_TBL", 'c_reg_users'); to define("C_REG_TBL", 'phpbb_users');
6. Customize index.lib.php in the “lib” directory and remove the registration link so you can only register thru the phpBB side.
That, to me, makes more sense then duplicating an entire user database if you are going to go that route. The current hack only created a user accoung on the chat if they logged into the chat, so instead of having smf build two user databases (of which the code would probably have to be reinputted every smf upgrade) they put it on the chat side to build the chat user database only for those that logged into the chat. There are only 370 users in the current phpmychat database on V1.0 for instance.
The splash screen, I think, was how the current board logged in the user. That would be where the login screen was before phpBB integration. It probably still uses that screen to drag in your encoded user data and when you submit it, logs you in that way...or something.
-------------------------------
Here is some stuff that smf can do that might make it easier.
http://www.rpgcitadel.com/smf_api.txt (change ext to php for use, of course...easiest way to allow its download without zipping it)
This script has all the user authentication stuff that I use. Here is how, after they login anywhere, I reauthenticate on every page load by using the following functions from smf_api.php.
if(smf_authenticateUser()) //grabs the cookie and checks it
$in_lockmor = TRUE; //if true then gives me the green light
smf_loadSession(); //loads up all the user variables that I will eventually use elsewhere
It uses the api to grab the cookie, reauthenticate it and badda bing. Then you have all the following available to use to try and integrate.
$smf_user_info['id'] = &$smf_user_info['ID_MEMBER'];
$smf_user_info['username'] = &$smf_user_info['memberName'];
$smf_user_info['name'] = &$smf_user_info['realName'];
$smf_user_info['email'] = &$smf_user_info['emailAddress'];
$smf_user_info['messages'] = &$smf_user_info['instantMessages'];
$smf_user_info['unread_messages'] = &$smf_user_info['unreadMessages'];
$smf_user_info['lastLogin'] = &$smf_user_info['lastLogin'];
$smf_user_info['language'] = empty($smf_user_info['lngfile']) || empty($smf_settings['userLanguage']) ? $smf_settings['language'] : $smf_user_info['lngfile'];
$smf_user_info['is_guest'] = $ID_MEMBER == 0;
$smf_user_info['is_admin'] = in_array(1, $smf_user_info['groups']);
So, would it be possible to use smf_members as the user database for both, grab the login data like above and grab the info to load it into the active chat when they login to chat? That would be done through the "splash screen" which provides the gateway between just being on the site and actually logging into chat and where all the integration would take place....
Just some thoughts. -
Ancient Gamer's Citadel Ideas, tasks and stuff
#22Okey dokey. I am on it. I might create a splashscreen-less version, just to show you, and then you decide which you prefer. -
Ancient Gamer's Citadel Ideas, tasks and stuff
#23If you can do it without the screen, that is fine by me, don't bother with the splash then. -
Ancient Gamer's Citadel Ideas, tasks and stuff
#24I finally have some time to work on this.
I am going to do the following:
-I use the smf_api and skip the entire login routine for the chat! If people are "smf_Authenicated", it is within their rights to be in the chat.
-If a user is an admin on Strolen's, he is a moderator in the chat (as per today).
-I provide two links from the user info area:
Link A) There are X users in the chat
Link B) Who is chatting
Much more intuitive than the onmouseover thing, see?
Viva V2! -
Ancient Gamer's Citadel Ideas, tasks and stuff
#25'Dats wut iam taulk'n 'bout.
Triple Snap in the 'Z' Formation -
Ancient Gamer's Citadel Ideas, tasks and stuff
#26Note to self:
-smf_api loaded
-->Must replace space with underscore (username) (for phpmychat)
------>Solved: $Username = str_replace(" ", "_", trim($smf_user_info['username']));
--> Must get index.php to display the chat instantly
-database changed
-->Must change all fields to fit the format within smf_members
----->password=>passwd, perms (admin/member) => ID_GROUP (1 or 2 /3+), rooms (This must be added to smf_members)
-Other
--> Must remove all functionality pertaining to registration, c_reg_users and logging on. -
Ancient Gamer's Citadel Ideas, tasks and stuff
#27Hmmm... These tables are not as easy to merge as phpbb and phpmychat. The smf_members table differs heavily from c_reg_users. So far I have had to ditch all references to latin1, add a rooms field, use ID_GROUPS instead of perms and a lot of other hacks.
I can only pray this will work in the end.
I might be out of my league here (but it is a learning experience)
Why AG sucketh at PHP:
PHP is considered "fun" by students. I was always the student project manager and did the dirty work, like project reports, UML, scheduling, OOP coding, optimization and C/Java coding. The others did HTML, CSS and PHP / Javascript.
Now, as I have cleansed my honour, I can once more resume this daunting task.
Once more into the breach, dear friends! -
Ancient Gamer's Citadel Ideas, tasks and stuff
#28*Radio static is interrupted by a distressed voice*
AG Reporting in:
Okay, this was a tricky one. The real problem is the port from c_reg_users to smf_members! The differences are vast and there are a kazillion lines of code that needs to be restructured. I have tried speeding through the code with "find and replace" but it won't do. There are too many factors to consider.
Solution 1:
Abide my time and get comfy with the code. To complete this task as I had originally intended, I need to fully understand the chat dynamics.
*AG's voice is suddenly cut off as the droning sound of a fatal Dreamweaver crash resounds through the Citadel. After a short period of static, the distressed voice continues his report*
Solution 2:
Another approach:
http://www.123flashchat.com/smf-chat.html
Your question: Is AG capable of modifying phpmychat?
My answer: I am. It will take time. A lot.
*AG's voice fades away, and the radio static is once again predominant in the Citadel* -
Ancient Gamer's Citadel Ideas, tasks and stuff
#29If we are going the java route, I would rather go with the "new chat" we already have. It has simple smf integration as well.
http://www.tufat.com/docs/flashchat/integration.html
Plus, we got the code and they are constantly upgrading it of which I haven't gotten the latest upgrade though.
Didn't look to hard if you could get the source, change the smilies etc.
I vote, if we are going flash, we use what we got already.
Otherwise we just wait. We have that shoutbox thing for the moment.
OR - We build our own.
OR - We just force a manual login for awhile. -
Ancient Gamer's Citadel Ideas, tasks and stuff
#30I'll play around with this here for a while and see what I can do with it. You decide what you want to do when you have time to think about it.
Any further post from me in this thread will either be an answer to a question, or the posting of the solution.
AG out. -
Ancient Gamer's Citadel Ideas, tasks and stuff
#31if ($action == 'login')
{
$username = addslashes(getVar('user'));
$password = getVar('passwrd');
smf_setLoginCookie(3153600, $username, $password, FALSE); //smf sets session with info
if(smf_authenticateUser())
$in_lockmor = TRUE; //smf checks session to see if logged in (TRUE) or logged out
smf_loadSession();
$current = time();
$in_lockmor ? $db1->query("UPDATE smf_members SET lastLogin = '$current' WHERE ID_MEMBER = '$smf_user_info'"): "";
}
elseif ($action == 'logout')
{
$cook = @unserialize(stripslashes($_COOKIE[$smf_settings['cookiename']]));
$userid = $cook;
$userpassword = addslashes($cook);
smf_setLoginCookie(-3600, $userid, $userpassword); //expires the current cookie
$in_lockmor = FALSE;
}
else
{
if(smf_authenticateUser())
$in_lockmor = TRUE; //grabs the cookie and checks
smf_loadSession(); //loads session variables
}
smf_logOnline('lockmor'); //smf board integration shows page browsing
$author = $smf_user_info['id']; //define the logged in user's id
if(!$author)
{
$author = -1;
//$cachetimeout=900;
//require_once("/home/strolen/jpcache/jpcache.php");
}
I assign the -1 to author for the Barbarian Horde. smf dealt with anon user different so I had to force that so V2.0 would work how I want it to.