View Full Version : Request: Journal
Jeremy W.
05-23-2002, 08:01 PM
The site I run has a rather creative user base. They love to express themselves in signatures that are often 50+ lines.
Obviously this isnt' necessary, but I also don't want to deprive them of this means of communication.
So, my thought is that if it was possible to have a "Journal" which users could put those 50-100 lines in, then I could tighten the signatures down to a respectable 4-10 lines.
What would the journal be? Well, probably it's own PHP file, realistically, which would probably look a whole lot like a single post (in terms of layout). You wouldn't be able to reply to it or anything, but you would have links to pm, profile, homepage, etc, much like a single post.
Am I making half sense here?
Xenon
05-23-2002, 08:13 PM
Hmm, the journal can only be Seen in the userprofile, or do you want to have all journals on one site?
Jeremy W.
05-23-2002, 08:20 PM
The Journal would be a link I would put on every person's post so they could see each other's journals. It's like a way of sharing your creativity (writing, wanderings, whatever) with your community mates :)
Jeremy W.
05-23-2002, 08:21 PM
So, I guess as far as editing your journal, you would probably do it in the same place as our signature because it's really an extension of that.
When viewing someone else's you would simply click their link on the side of their post or in their profile...
I really hope I'm making sense :)
Xenon
05-23-2002, 08:41 PM
Its not so hard to make, but you have to edit a few files...
first you should add a field to your user-table called journal, same options than signature.
then edit the file member.php
find
$signature=htmlspecialchars($bbuserinfo[signature]);
below add:
$journal=htmlspecialchars($bbuserinfo[journal]);
then find:
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='".addslashes($signature)."',customtitle='".intval($customtitle)."',usertitle='".addslashes($customtext)."',email='".addslashes(htmlspecialchars($email))."',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser='$coppauser',homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',usergroupid='$bbuserinfo[usergroupid]' WHERE userid='$bbuserinfo[userid]'");
change it to:
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='".addslashes($signature)."',journal='".addslashes($journal)."',customtitle='".intval($customtitle)."',usertitle='".addslashes($customtext)."',email='".addslashes(htmlspecialchars($email))."',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser='$coppauser',homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',usergroupid='$bbuserinfo[usergroupid]' WHERE userid='$bbuserinfo[userid]'");
edit template modifyprofile
find
<tr>
<td bgcolor="#DFDFDF" valign="top"><b><normalfont>Signature:</normalfont></b><br>
<smallfont>Optional signature you may use to appear at bottom of your posts.</smallfont>
<p><smallfont>HTML code is $htmlonoff<br>
<a href="misc.php?s=$session[sessionhash]&action=bbcode">vB Code</A> is $bbcodeonoff<br>
[img] code is $imgcodeonoff<br>
<a href="misc.php?s=$session[sessionhash]&action=showsmilies">Smilies</a> are $smiliesonoff
</smallfont></p></td>
<td bgcolor="#DFDFDF"><textarea name="signature" rows="6" cols="40">$bbuserinfo[signature]</textarea></td>
</tr>
below add:
<tr>
<td bgcolor="#DFDFDF" valign="top"><b><normalfont>Journal:</normalfont></b><br>
<smallfont>Optional journal you may use to appear at bottom of your posts.</smallfont>
<p><smallfont>HTML code is $htmlonoff<br>
<a href="misc.php?s=$session[sessionhash]&action=bbcode">vB Code</A> is $bbcodeonoff<br>
[img] code is $imgcodeonoff<br>
<a href="misc.php?s=$session[sessionhash]&action=showsmilies">Smilies</a> are $smiliesonoff
</smallfont></p></td>
<td bgcolor="#DFDFDF"><textarea name="journal" rows="6" cols="40">$bbuserinfo[journal]</textarea></td>
</tr>
then make new file journal.php
content: see some posts below.
Add a Link wher you want to show the journal like this (postbit version):
<a href="journal.php?userid=$post[userid]">Journal</a>
Its not optimated code, but it should work :)
Jeremy W.
05-23-2002, 10:14 PM
That's great. Only quesiton is how do I do this? "first you should add a field to your user-table called journal, same options than signature. "
Xenon
05-24-2002, 11:10 AM
i'd say you should use phpmyadmin ;)
Jeremy W.
05-24-2002, 11:12 AM
Yeah, if RackShack hadn't messed it up I might. One of the reasons I'm moving to a new server :)
Ah well, I guess I'll leave this here until then :(
Xenon
05-24-2002, 11:33 AM
you can install phpmyadmin on your own, just download make the right options and upload ^^
Jeremy W.
05-24-2002, 11:36 AM
Hmm, install another copy in another area, eh? Why not, I'll do that tomorrow :)
Jeremy W.
05-25-2002, 01:42 PM
Okay, got phpmyadmin reinstalled, now the question is what is the SQL for "first you should add a field to your user-table called journal, same options than signature" ?
Jeremy W.
05-25-2002, 01:58 PM
Okay, I assumed that to mean, add 3 fields to the user table called journal, options, signature:
ALTER TABLE `ringquest_com`.`user` ADD `journal` TEXT NOT NULL, ADD `options` TEXT NOT NULL, ADD `signature` TEXT NOT NULL
However there is already an options field...
Xenon
05-25-2002, 02:11 PM
no, i meant, ALTER TABLE 'user' ADD 'journal' TEXT NOT NULL
just the same options like the signature field: Mediumtext Not Null...
Xenon
05-25-2002, 02:33 PM
here is the journal.php.
i have made some greate optimizations, but think of it, it is not perfect. Right now, it doesn't use the headers, and other things from your board. I think you can make it yourself from here, if not, say a word and i'll try to optimize it more....
Jeremy W.
05-25-2002, 08:14 PM
Here is the link: http://www.ringquest.com/forums/journal.php?userid=1019
It isn't live yet, but just to show you how it looks and everything. I'm very new to vb and to php so importing the styles, locations, replacement vars, etc is a bit beyond me right now.
Xenon
05-25-2002, 09:38 PM
ok, i can see :)
i have uploaded a ne journal.php so please download again.
then make a new template called "journal" and put in it:
{htmldoctype}
<html>
<head>
<!-- no cache headers -->
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="no-cache">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="Cache-Control" content="no-cache">
<!-- end no cache headers -->
<meta name="keywords" content="vbulletin,forum,bbs,discussion,jelsoft">
<meta name="description" content="$bbtitle is a discussion forum powered by vBulletin. To visit the forum, go to $bburl/ . To find out about vBulletin, go to http://www.vbulletin.com/ .">
<title>$bbtitle - powered by vBulletin</title>
$headinclude
</head>
<body>
$header
<br>
$navbar
<table bgcolor="{pagebgcolor}" width="{tablewidth}" cellpadding="0" cellspacing="0" border="0"><tr><td width="10"><img width="10" height="1" src="{imagesfolder}/space.gif" alt=""></td><td width="100%"><!-- spacer -->
<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
<tr>
<td bgcolor="$post[backcolor]" width="175" valign="top" nowrap>
<a name="post$post[postid]"></a>
$post[firstnewinsert]
<normalfont><b>$post[username]</b></normalfont><br>
<smallfont>$post[usertitle]</smallfont><br>
$post[avatar]<p>
<smallfont>Registered: $post[joindate]<br>
Location: $post[field2]<br>
Posts: $post[posts]</smallfont></td>
<td bgcolor="$post[backcolor]" width="100%" valign="top">
<smallfont>$post[icon] <b>$post[title]</b></smallfont>
<p><normalfont>$post[message]</normalfont></p>
$post[attachment]
<p>$post[signature]</p>
<p>$post[editedby]</p>
<p align="right"><smallfont><a href="report.php?s=$session[sessionhash]&postid=$post[postid]">Report this post to a moderator</a> | $post[iplogged]</smallfont></p>
</td>
</tr>
<tr>
<td bgcolor="$post[backcolor]" width="175" height="16" nowrap><smallfont>$post[foldericon]
$post[postdate] <font color="{timecolor}">$post[posttime]</font></smallfont></td>
<td bgcolor="$post[backcolor]" width="100%" valign="middle" height="16">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="bottom">
<td><smallfont>$onlinestatus
$post[profile] $post[pmlink] $post[useremail] $post[homepage] $post[search] $post[buddy]
<!-- $ post[icqicon] --> <!-- $ post[aimicon] --> <!-- $ post[yahooicon] -->
</smallfont></td>
<td align="right" nowrap><smallfont>
<a href="editpost.php?s=$session[sessionhash]&action=editpost&postid=$post[postid]"><img src="{imagesfolder}/edit.gif" border="0" alt="Edit/Delete Message"></a>
<a href="newreply.php?s=$session[sessionhash]&action=newreply&postid=$post[postid]"><img src="{imagesfolder}/quote.gif" border="0" alt="Reply w/Quote"></a>
</smallfont></td>
</tr>
</table>
</td>
</tr>
</table>
</td></tr></table>
<!-- spacer --></td><td width="10"><img width="10" height="1" src="{imagesfolder}/space.gif" alt=""></td></tr></table>
$footer
</body>
enjoy :)
Jeremy W.
05-25-2002, 10:09 PM
Awesome, that fixed that issue! The only other one was the fact that apparently Journal entries from Edit Profile aren't being saved.
When I hit submit and go back the field is still blank, and it is equally blank in the journal.php (which functions gorgeously, thanx!) :)
Xenon
05-26-2002, 12:46 AM
hmm, i see, but i can't find an error in my codes.
do you have integratet everything right?
if yes, perhaps there is s.o. else, who could help, cause i don't see the fault... :(
rascal
05-29-2002, 07:45 AM
This is quite interesting. If I follow this thread correctly, does this mean the journal is some sort of a blog? Would other members be able to view it?
Xenon
05-29-2002, 11:32 AM
yes, every member could see the journal from other members.
VeRT3X
06-02-2002, 08:50 PM
xenon release the hack to public = ]
Chris M
06-03-2002, 03:49 AM
Yes...
It is an Interesting Hack!
Hey Vertex...
Satan
Xenon
06-03-2002, 12:05 PM
*ggg*
ok, will do so in a few days, just have to install it on my local board and test it a bit more ;)
Jeremy W.
06-03-2002, 07:45 PM
Yes, release it... It still isn't working on RingQuest though. Users can still not input data, that area of member.php or whatever isn't doing anything at all (no errors, no data in the database).
When it is my users will be very happy because they are eagerly awaiting this!
Unknown553
06-03-2002, 09:12 PM
Can't this hack can also be done with slight modifications to vBpad (https://vborg.vbsupport.ru/showthread.php?s=&threadid=29760)? All you'd have to do is make it visible to other users, right? Or am I missing something?
Jeremy W.
06-03-2002, 09:50 PM
We're also using vbpad though...
Xenon
06-04-2002, 09:50 AM
unknown: don't know, i don't use vbpad
jeremy: hmm, i don't know why it doesn't work on your forum, there shouldn't be a problem. i have made a smiliar enter script for the database and all works perfect...
but stay cool, i'll test it a bit more in a few days :)
Jeremy W.
06-04-2002, 10:53 AM
Dno't worry, I'm not upset or anything I'd just love to get this workign for my users :)
I appreciate all your work and helpfulness, you've been top notch :D
Jeremy W.
06-05-2002, 12:19 AM
Well, I fixed some database issues and now it is working :)
www.ringquest.com/forums to see it in action (inside all postbits is a link to the journal) :)
Xenon
06-05-2002, 03:54 PM
database issues from my advises or issues from your DB?
when you changed something i have written, please post it, so i can include it when i'll release it ;)
Jeremy W.
06-21-2002, 10:29 PM
I just fixed some spelling and stuff. Anyways, only comment my users have (besides loving it) is: avatars aren't showing up... How do I fix this on journal.php?
Jeremy W.
07-08-2002, 12:48 AM
Hey, just wondering if you've released this officially yet :) If not, how would I add a user's avatar to the "postbit" (equivalent) in the Journal?
Xenon
07-08-2002, 01:11 PM
really?
i thought, the avatar works perfect
as i see in the file (my last version) it is included, so if you have it also in the template, it should work...
but i don't know all modifications you made ;)
indiamike
07-08-2002, 11:47 PM
This is an interesting thread and I have been following it for awhile to see where it leads to since apparently the Chocojournal (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36736&highlight=chocojournal) will probably never be released.
I installed this on a test site and it looks okay. Thought like above the Avatar didn't work, even with a differant postbit file inserted into the new journal template. Must be something in the php page (still searching to find out why).
I will mess around with a bit to keep this idea going for those interested and also post any changes or modifications that I do.
Cheers
Mike
Jeremy W.
07-09-2002, 12:30 AM
Yeah, no worries, I'd love to have it working. Maybe if this was simply released officially it would be better for everyone (including Xenon who's been so great!) :)
Xenon
07-09-2002, 10:25 AM
feel free to do so :)
you can also release your working version officially, just a small mention would be nice ;)
good luck in working on it
supreemball
07-25-2002, 12:51 AM
are comments (aka replies) enabled on each journal entry? it would be nice, if not. also if comments are enabled, they should be linked on the original journal entry, as to not take away from the original journal entry.
Riddel
07-25-2002, 04:50 AM
this is awesome but is there a way to modify it so that it is more like a real journal as in allowing people to make distinctive posts per day? (eg like livejournal)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.