WordPress.org

Ready to get started?Download WordPress

Forums

wp-People (53 posts)

  1. LoganSix
    Member
    Posted 10 years ago #

    I have finished my first hack and have it ready for the world to view.
    wp-People is a hack that will replace people's names with a link to a pop-up bio information screen. (1.0+ Compatible)
    You can find out more information and download the zip from my forum.
    wp-people forum thread
    I also put the information on the Wiki.

  2. NuclearMoose
    Member
    Posted 10 years ago #

    Dean,
    This is a really great hack! Kudos to you for making it available for us all!

  3. LoganSix
    Member
    Posted 10 years ago #

    Anybody using my hack yet?
    Besides the selfish need for attention, I want to know if anyone is having any problems with it.
    Thanks.

  4. tcervo
    Member
    Posted 10 years ago #

    This hack looks good, but I haven't had time to install it yet. Maybe next week...

  5. Lauren
    Member
    Posted 10 years ago #

    Sorry I'm an idiot when it comes to php. How do you exactly copy the script to my-hacks.php
    I tried and it gave me this error
    SQL/DB Error:
    [Table 'protag_nimrodelwp.b2people' doesn't exist]
    SELECT ID_PERSON, real_name, bio FROM b2people
    Warning: Invalid argument supplied for foreach() in /home/protag/public_html/nimrodel/my-hacks.php on line 23
    Also, I've already installed b2people in the database

  6. OperaManiac
    Member
    Posted 10 years ago #

    it specifically says!
    Table 'protag_nimrodelwp.b2people' doesn't exist

  7. Lauren
    Member
    Posted 10 years ago #

    The installation went fine. I can even add people to the database in the admin. so what's missing?

  8. sindas
    Member
    Posted 10 years ago #

    ok, installed fine. but it doesnt work. for some reason it keeps reseting my URL I have entered in my peoples profiles to just some random page in my site, (that I created... dont know why its doing that...) and the pics dont work, they are always going to http://www.mysite.com/Object
    never what I want it to go to, it always resets itself.

  9. mtanner
    Member
    Posted 10 years ago #

    This is really neat is there a way to have the pop up window link for wp-people replace the link that is left when users leave comments using their name & url?
    Before I install can I chose what names get linked or will this be simular to the phpgiggle add-on where they are linked automatic?
    Thanks Dean

  10. LoganSix
    Member
    Posted 10 years ago #

    @sindas
    What is your site? Can I look at your example?
    @mtanner
    You can enter anyone you like. When ever that name appears, then the link is created. I suggest that you use full names, so you don't have multiple people with the same name, like Bob or Dave.

  11. sindas
    Member
    Posted 10 years ago #

    http://www.shadesofburgundy.com
    try the first name you see "An"
    I was just kinda testing around with hers, I couldnt even get it to show the nopic thing.

  12. lectique
    Member
    Posted 10 years ago #

    hmm just a few suggestions:
    a.) it would be cool if there were a way to assign multiple names to one person. I might have a friend called Joseph, but i also call him J, joe, seph, whatever...it would be great if i could enter multiple names.
    b.) it would also be excellent if it would still create the links despite differences in uppercase/lowercase. Now Joseph and joseph are still two different people, which means i have to remember if i entered the name in uppercase or lowercaseinto the db when i write my blog.
    b.) it would be great that if i didn't have my nophoto image in the directory specified in both people-admin.php and people-popup.php then i didn't have to change it in both files, as i do now. You only mention changing it in the popup as far as i can see. If i only change it in the popup, i still have to manually type in /blog/images/nophoto.jpg when i enter a new person, instead of /images/nophoto.jpg. I found a hardlink to /images/nophoto.jpg in the people-admin and changed that and now it works, it has the changed URL in the textfield when i enter a new person, but that wasn't mentioned in the readme :)
    c.) i installed it and it works fine but it started parsing the bios in the popup windows for names, too., and creating links, which is a bit pointless. so i commented out /*$bio = peopleDefine($bio);*/ from the people-popup and now it doesn't do it anymore.
    d.) i seem to have real problems editing the people-popup. for some reason even though i have made changes they just REFUSE to show up, even though i have double and triple checked. SO far i can't find out why not. maybe thats just me tho, it wouldn't be the first time. ;)
    but cool hack. i like it. I had been looking for something like this in a while :)
    -perry

  13. anatman
    Member
    Posted 10 years ago #

    Hi,
    Looks very nice on your test, LoganSix. Now for a question: when i post to my blog, the post header will say "filed under somecategory by eduardo @date". Can i get <b>that</b> name to become a wp_people-link? That is, the hack would become a "who are we" thing for the authors.
    Thanks
    Eduardo

  14. LoganSix
    Member
    Posted 10 years ago #

    @sindas
    Apparently the link doesn't even work.
    You only have one entry in your wp-people database.
    Try testing it out on someone with a longer name. I'm not sure if that would be an issue, but I will recheck.
    Try pulling up the popup, by putting in the url and a value for the person.
    /wp-people-popup.php?person=1
    @lectique

    1. I'll look into nick names, but I don't see how you could do that, because if you know more than one person called Joe, how are you going to tell the difference. The most I could do is, you put in the persons full name and the link will display a nickname.
    2. The nophoto was just a image place holder, it doesn't matter in the admin screen, because you would have "no photo". The directory was the /images directory. So, that would be your root directory. I guess I will have to add a vars page, so you can specify the directory in the vars page and it will change in both places. But, you could add the url to your default "no photo" and it should show up on the admin screen too.
    3. change peopleDefine($bio); to just $bio, if you don't want the bio's to create a people link. I added that so you could create a relationship between people. In my example, Deb and Jon are married, so I wanted a link between their bios.
    4. Make sure your browser cache is cleared. IE has a problem of saving past pages too well.

    @anatman
    Not exactly sure, but you could could try changing your index.php page where it includes the post. You would have to alter the author part.
    peopleDefine(the_author(););
    Or you would have to change it in the wp-includes/template-functions.php file.

  15. LoganSix
    Member
    Posted 10 years ago #

    it would also be excellent if it would still create the links despite differences in uppercase/lowercase

    This is fixed now.
    Check out my forum for the simple solution.
    wp-people hack thread

  16. LoganSix
    Member
    Posted 10 years ago #

    @anatman - I posted a solution to your question on my forum.
    wp-people hack thread
    It requires editing the template-functions.php file. I am guessing that this file would be updated if you updated WordPress, so you would have to make this change again.

  17. anatman
    Member
    Posted 10 years ago #

    I will check it now, and try to run it locally first. I will post back - Thank you!

  18. lectique
    Member
    Posted 10 years ago #

    hi again,
    great about the lowercase/uppercase implementation.
    But sadly, i tried it in my blog and just came up with a bunch of errors. Every time it was supposed to do a link, i came up with this instead, as soon as i had used the new syntax:
    Javascript:myVoid()" onClick="peoplePop(8);">Javascript:myVoid()" onClick="peoplePop(1);">John
    where "john" was the name it was supposed to create a pop up window for. I tried both the syntax mentioned in your forum, as well as downloading the whole zip file and replacing the text in my myhacks.php with the text in your textfile, as to make sure i hadn't copied something wrong, but both were no go.
    it seems to sometimes create the links correctly, but as of yet i haven't determined where the differences are between the error-names and non-error-names. :(
    if i do find the differance i will post it here. You might be able to see these errors here: http://www.nicedyke.net/blog/ (depending on whether i fix them first or not) ;)
    but thanks for looking into it.
    -perry

  19. lectique
    Member
    Posted 10 years ago #

    ok well i seem to have found what caused the error, i had a friend in my db called "J" and it seems the single character name fscked it up. She is now called "J_" and that seems to be ok and doesn't create link errors. Now i have the problem that the hack only creates the popup-links if the name is spelt lowercase:
    http://www.nicedyke.net/blog/index.php?p=55
    as you can see i tried all names in lowercase, all in first letter uppercase (as they are entered into the db) and then all in uppercase.
    In the first example, it *looks* like they were first letter uppercase as the hack transforms the link, when in reality all the letters are lowercase.
    i'd have a look at the php code myself but my php skills are still a bit too lacking to make much sense of it :-/
    -perry

  20. LoganSix
    Member
    Posted 10 years ago #

    It will only link once per article.
    Part of the search and replace function.
    So, if you want to test upper, lower, and sentence, you'll have to switch it around and try it again or create three separate articles.

  21. lectique
    Member
    Posted 10 years ago #

    ahh! /me slaps forehead
    i get it. cheers. seems to be working now. Sweet. Thanks for the patience :)
    -perry

  22. anatman
    Member
    Posted 10 years ago #

    Hey LoganSix,
    Just to let you know that in the end i didn't install the hack. I decided towait for WP1.2, 'cause there will be a wp_list_authos() function, that's more like to what i am looking for.
    Thanks anyway!

  23. LoganSix
    Member
    Posted 10 years ago #

    @lectique - great! I didn't want to give you a hard time about it. ;)
    @anatman - hmmmm, will it have the same feature as wp-people?

  24. LoganSix
    Member
    Posted 10 years ago #

    Is that your complete my-hacks.php file?
    Because if it is, you are missing the opening
    <?php
    Other than that, I can't see anything wrong.
    I have a break in the script to allow for th JavaScript tag. So there are two sets of <?php ?> in the hole file.

  25. anatman
    Member
    Posted 10 years ago #

    LoganSix,
    No, the function wp_list_authors() will not do the same as your hack. It will just allow one to display a list of authors on the menu bar, and clicking the author will display his posts. It seems easy to ad a small gif or link beside each author as a link to a "who am i" static page, which is more what i am looking for.
    Your hack seems more comprehensive: it converts names anyhwere to links, and any name you choose to register...
    keep it up, i think it is a nice tool!
    Eduardo

  26. Anonymous
    Unregistered
    Posted 10 years ago #

    That fixed the problem! I just assumed your script would work out-of-the-box so to speak...

  27. Anonymous
    Unregistered
    Posted 10 years ago #

    Ok, now I don't get that error, but having another problem. Where are the links suppose to appear on the site? I've checked in the comments and the poster names, but they aren't links.

  28. LoganSix
    Member
    Posted 10 years ago #

    @laebshade - The links appear in the post content. You have to have the name (case insensitive) the same as it is in the database.
    Do you have a URL I can look at?

  29. LoganSix
    Member
    Posted 10 years ago #

    @mark - Yeah, I noticed that and fixed it on my side, but wasn't going to upload a new version until I had the nickname part working.
    Glad everything is working for you now.

  30. Anonymous
    Unregistered
    Posted 10 years ago #

    hmm..two issues with this.
    1) it doesn't work...
    http://www.matthewtancock.co.uk/wordpress
    i created a test post with two "people" and I get a funny error in the pop-up page...
    SQL/DB Error:
    [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3]
    SELECT people_name, people_bio, people_url, people_image_url, people_image_title_nm FROM wp_people WHERE people_ID=
    Warning: Invalid argument supplied for foreach() in home/public_html/wordpress/wp-people-popup.php on line 14
    the other issue is, the links don't work at all when using permalink/archive structure cos of mod_rewrite...i'm sure there's probably some simple rule you can add to get around this one...but I don't have a clue :)
    First issue is more pressing really...
    cheers!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.