View previous topic :: View next topic |
Author |
Message |
Joseph
Joined: 28 Oct 2002 Posts: 27 Location: Waterloo, Canada
|
Posted: Mon Oct 28, 2002 6:36 am Post subject: For those of you who make mention of others in your blogs... |
|
|
I found that I was making mention of a lot of people that my friends back home wouldn't know. At first I was simply describing them in my posts, but then I realized it was a wast of effort.
So I made a people hack - the admin interface lets you add/edit/delete people's bios. There is a variable in the config file to toggle on and off topic parsing. When the post/comment is parsed, it searches for people's names you have added - and turns the name into a link automatically. The link opens a window including the bio.
The bio information isn't parsed for anything, so it can hold HTML code as well.
It's very simple, but it does the job. You can see it in effect http://www.redpointlife.com/joseph/ and you can download the relevant files from http://www.redpointlife.com/joseph/b2people.zip
Last edited by Joseph on Mon Jun 09, 2003 11:33 pm; edited 1 time in total |
|
Back to top |
|
 |
hellhound
Joined: 24 Oct 2002 Posts: 38
|
Posted: Mon Oct 28, 2002 7:23 pm Post subject: |
|
|
link dead? ( |
|
Back to top |
|
 |
Joseph
Joined: 28 Oct 2002 Posts: 27 Location: Waterloo, Canada
|
Posted: Fri Nov 01, 2002 1:20 pm Post subject: My Bad |
|
|
Sorry - should be fixed now. |
|
Back to top |
|
 |
Joseph
Joined: 28 Oct 2002 Posts: 27 Location: Waterloo, Canada
|
Posted: Mon Dec 02, 2002 8:44 am Post subject: Some Screen Shots |
|
|
Just realized that this topic doesn't really have a very good description of the functionality.
So I made some screenshots.
This is a shot of the admin interface as you first see it. You can get to this by clicking on the "People" link this mod adds to the menu at the top.
This is a shot of the screen you get when you "Edit" a person. Note, right after you add a name to your list of people, you are taken to the editing screen for that person.
This last shot is a shot of the window that pops up when you click on a person's name. Pretty straight forward I think.
Oh yeah, and all these thumbs and images were uploaded using this hack. |
|
Back to top |
|
 |
Tank
Joined: 15 Jun 2002 Posts: 37 Location: Filthydelphia
|
Posted: Wed Dec 11, 2002 4:13 am Post subject: |
|
|
that's a dope hack and useful for so many things. thanks! |
|
Back to top |
|
 |
evelyne
Joined: 12 Dec 2002 Posts: 23 Location: Delft - The Netherlands
|
Posted: Thu Dec 12, 2002 11:33 am Post subject: Trouble getting it worked |
|
|
I'm having trouble to get it done. Don't know where I went wrong. Possibly I have to CHMOD some of the files or something to another value? The administration of this peoplehack is working, but the linking when posting isn't working. Someone know where to look? |
|
Back to top |
|
 |
Joseph
Joined: 28 Oct 2002 Posts: 27 Location: Waterloo, Canada
|
Posted: Thu Dec 12, 2002 2:48 pm Post subject: Are you sure you did all the steps? |
|
|
It doesn't sound like a CHMOD problem. Are you sure you completed all the steps - especially
Code: | b2-include/b2template.functions.php:
added
$content = convert_people($content); after line 239
$comment = convert_people($comment); after line 730 |
? |
|
Back to top |
|
 |
evelyne
Joined: 12 Dec 2002 Posts: 23 Location: Delft - The Netherlands
|
Posted: Thu Dec 12, 2002 3:02 pm Post subject: problem found |
|
|
I found the problem, the code shouldn't be inserted after line 239 but after line 293 |
|
Back to top |
|
 |
evelyne
Joined: 12 Dec 2002 Posts: 23 Location: Delft - The Netherlands
|
Posted: Thu Dec 12, 2002 3:04 pm Post subject: problem found 2 |
|
|
think it's better not to talk in linecode.
The first line has to be insterted somewhere within the function:
function the_content($more_link_text='(more...)', $stripteaser=0, $more_file='') {
}
and the second one between:
function comment_text() {
} |
|
Back to top |
|
 |
Joseph
Joined: 28 Oct 2002 Posts: 27 Location: Waterloo, Canada
|
Posted: Thu Dec 12, 2002 4:55 pm Post subject: Good point |
|
|
I assume it's working then?
Good point about the line code - I'll update my download when I get the chance. |
|
Back to top |
|
 |
evelyne
Joined: 12 Dec 2002 Posts: 23 Location: Delft - The Netherlands
|
|
Back to top |
|
 |
Garfizh
Joined: 03 Jul 2002 Posts: 28
|
Posted: Fri Dec 27, 2002 8:53 am Post subject: Problem? |
|
|
This error is found in the admin page of People:
Warning: Supplied argument is not a valid MySQL result resource in /u/web/wizard/b2peopleadmin.php on line 111
Warning: Supplied argument is not a valid MySQL result resource in /u/web/wizard/b2peopleadmin.php on line 132
What could possibly be wrong here?
This one is in my blog:
Warning: Supplied argument is not a valid MySQL result resource in /u/web/wizard/b2-include/b2functions.php on line 280 |
|
Back to top |
|
 |
Joseph
Joined: 28 Oct 2002 Posts: 27 Location: Waterloo, Canada
|
Posted: Wed Jan 01, 2003 12:20 pm Post subject: Grants |
|
|
Garfizh, it's dying on the following query:
CHECK TABLE b2people
which means you probably don't have permission to do a CHECK on your host. You can rectify this, by simply doing the following;
Visit: http://www.mysite.com/b2/b2peopleadmin.php?action=install
Then comment out lines 109-111 which should be
Code: | $sql = 'CHECK TABLE b2people';
$result = mysql_query ($sql);
$row = mysql_fetch_assoc ($result); |
You see, the purpose of that code was simply to check if the table was installed. If it wasn't it would show you a link to the install code. Once the table has been installed, it's perfectly safe to remove said check  |
|
Back to top |
|
 |
Jessabelle
Joined: 06 Jan 2003 Posts: 3 Location: Portland, ME
|
Posted: Tue Jan 07, 2003 8:40 pm Post subject: b2menutop.txt? |
|
|
I was going through the "readme" file to see what to do after adding all the names into the mod, and for some reason I'm not finding the file "b2menutop.txt" which in the readme file it says:
"b2menutop.txt
added
3 b2peopleadmin.php People after line 3"
I'm wondering if I'm just misunderstanding the instructions? or if I'm not doing something right? _________________ Jessa
http://gracewithin.org
[email protected] |
|
Back to top |
|
 |
Joseph
Joined: 28 Oct 2002 Posts: 27 Location: Waterloo, Canada
|
Posted: Wed Jan 08, 2003 4:44 am Post subject: It's a standard b2 file |
|
|
It's a file that b2 installs - it's in your b2-include subfolder |
|
Back to top |
|
 |
|