Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 22,201 through 22,225 (of 32,507 total)
  • Author
    Search Results
  • #84367

    In reply to: @ links (mentions)

    Gautam
    Member

    Replying to kevinjohngallagher’s post (maybe its in spam, but I got an email notification as I am subscribed to topic):

    1) Making “@” links is cool, and very “twitter generation”, even if its not something that’s totally globalised yet. But the “@” link is not pointing at what you’re replying to. We’re faking the functionality without the reasoning, which in the end will just confuse users.

    On Twitter, you post on your profile page. People read it on their feed, and reply on their own Profile page. So a link to “@kev” goes to the page where “kev” has written his post. That’s the point of it, to link to someone’s post.

    Here, we’re making the link “@kev” go to “/profiles/kev/” for the user to not see the post. That’s exactly the opposite of the purpose of the “‘@” linking system :)

    –> That’s basically the work of a reply plugin, not of a mentioning plugin. I also have future plans with the plugin like linking #tag, etc. Even if I do something like that which you have mentioned, then a single user can make multiple posts, then which post will the plugin link to?

    2) The other issue is that Twitter names don’t have spaces, while BBpress / wordpress names can. So if i write “@Michael R Thanks for your reply”, how does the plugin know where the username ends? What if it finds a “michael” in the usertable, it will then link “@Michael” to “/profiles/michael/” and the message will read “R Thanks for your reply”. In Twitter, it parses at the first space; but we can’t do that here.

    Oh that will also involve looping through queries until you find a match, so first for Michael, then for Michael R, then for Michael R Thanks etc. Ofcourse there could/should be a word/search limit – either way there is huge potential for database issues there. Imagine adding up to 5 sql searches, per “@” per post, per page load.

    The initial solution, and i suppose this is for Gautam, is to make a search of the user table for all users who have posted on the topic being replied to, which should narrow it down considerably, though it should be noted that if you have “Michael” and “Michael R”, or any similar naming issues, the plugin will not know that…

    –> That can’t be helped. The plugin first checks if that username exists, if not, then checks if that nicename exists. This will be also mentioned on the plugin page.

    3) You are effectively allowing a user to search your database for anything you put after your “@” symbol. Now this one is a little bit of scaremongering, but we’ve all seen bad coding before. What if I write “@drop table wp_usermeta hi bob, how much fun would this be :)“. There is a reason that we try to make sure we don’t take database queries from the user.

    –> 1) This is what is used to match the username – /[@]+([A-Za-z0-9-_]+)/, so there is no point of mysql commands going in there.

    If you want to test the plugin (how it works), you are free to use this as sandbox – http://forum.gaut.am/

    I have made some posts to test the plugin here.

    #84364

    In reply to: @ links (mentions)

    Michael
    Participant

    Nice :)

    #78849
    tobefound
    Member

    @pinpin_lelapin:

    Did you get things working? Me too interested in getting a simple and clean forum working with an existing login system on codeigniter.

    /T

    #84362

    In reply to: @ links (mentions)

    Michael
    Participant

    Great – thanks Gautam. Looking forward to it. :) (Are you maybe calling it bbMentions? ;) )

    #84358

    In reply to: @ links (mentions)

    BBprogress had two versions of this one mate, they should still be kicking around somewhere. The first one used Ajax to convert the links (it pinged a search page for @username).

    That said… My issue with it at the time is my issue with what you’re trying to achieve as well. 9/10 when someone is typing “@Michael R” they are replying to a post above. To that end, the “@Michael R” should link to that post, not to the person’s profile page. What you effectively need is a “reply to” button as well as a “quote” button that pre populates the “@Michael R” information.

    Writing that functionality isn’t a problem (check out the quote plugin), but rather that there is no hook in BBpress that doesn’t hardcode output from the core to the bottom of each post. Not only would you need a plugin, but you’d also need a theme with additional hooks/function calls.

    Its definitely doable though, once yu have defined exactly what it is you’re after/the need is for it :)

    #84357

    In reply to: @ links (mentions)

    Michael
    Participant

    Right, I have looked at the Easy Twitter Links plugin, but I’m not sure how to alter it to run through the post. I’d probably have some idea if I managed to find the code BuddyPress uses. I wish I could grep the folder, but I don’t have Linux…

    #84356

    In reply to: @ links (mentions)

    Michael
    Participant

    @OKTeaRoom – I will have a look at that – though I’d also need to find out how to check for member existance.

    @etiviti – Thanks, I’ll download it and run through the code. I’m sure it’ll be easy to make the plugin.

    #83770
    rohanduggan
    Member

    Sounds cool, thanks for the info. Sorry for the redundant post in that case… I thought somebody had just not updated the message assuming (and we know what they say about assumptions:)) that if the plug in was searchable via WP backend with an install button that it might be installable. My enthusiasm (desperation) for a decent BB for WP got the better of me :)

    #84355

    In reply to: @ links (mentions)

    if you look at the buddypress code for activity-notifications (can’t remember the filename) but they have a simple function that filters the content, checks for @<username> string, then validates against the usertable and rewrites the content with a link.

    #32936

    Topic: @ links (mentions)

    in forum Showcase
    Michael
    Participant

    Have been working on my forum recently, and I have though tof something I’d like to add to it.

    Now, I’m no plugin developer, or PHP junkie, but I’d like to know what steps would be needed to turn @ links (mentions, like those found on Twitter) into links that take the user to a members profile page/or maybe even the member’s website (if any).

    Example:

    ‘@matt’ would become ‘@matt

    It would obviously have to scan through the post, check for any mentions, check if the user exists, and if it does, then apply the link. Now, I have no idea how this would be implemented – I hope to learn more soon. :)

    This may not be a very great idea to have for a bbPress forum, but I think it would be nice. Could anyone help me with this?

    Peace, Michael

    #84176

    In reply to: Thanks plugin

    Michael
    Participant

    @gerikg – it’s more of a ‘like’ plugin. :)

    #82537
    gerikg
    Member

    1. Shut off your caching plugin first.

    2. You didn’t follow #8 correctly. “define(‘COOKIEPATH’, ‘/’ );” should be after ?php

    if it doesn’t work email me (on my profile)

    #84174

    In reply to: Thanks plugin

    Michael
    Participant

    Sounds great Paul – love the way you go beyond with plugins. Thank you for that. :)

    That wouldn’t be a problem; I’m always tweaking my theme files to make it all just look better. :)

    #84312
    Sabuntu
    Member

    actually he was cooperative and tried to explain as simple as he could but i’m not that clever to catch him up :)

    Damien
    Member

    Instantly knocked 3 queries from my mainpage, thanks :)

    #84322

    In reply to: Parse error on install

    TextWrangler for Mac. :)

    #84269
    Dailytalker
    Member

    Did you follow the steps decribed in this topic?

    Did you install the plugin?

    Did you change the permalinks to “name” before activating the plugin?

    Did you change the codes in your htaccess?

    Did you write as rewrite base /?

    Thats what I have in the htaccess of my wp-frontpage:

    RewriteBase /

    So it really must work. I am pretty sure.

    #84263
    Dailytalker
    Member

    What you can do is what I have….

    http://www.dailytalk.ch/forum

    1st step

    Download the plugin, you find on the link bellow and follow the instructions on that site:

    http://blog.markroberthenderson.com/getting-rid-of-forums-and-topic-from-bbpress-permalinks-updated-plugin/comment-page-1/#comment-37

    2nd step

    If the name of your forum is “forums” you need to name the RewriteBase /forums/

    RewriteBase /forums/

    If the name of your forum is “community” your RewriteBase is /community/

    RewriteBase /community/

    etc.

    3rd step

    After you have followed the steps of that site you will find some bugs. To solve them do the following:

    To solve the major bugs you need to do this:

    I found a solution for the admin-backend link!

    Just ad the following code

    RewriteRule ^bb-admin/$ – [L]

    before this code

    RewriteRule ^([^.]+)/([^.]+)/page/([0-9]+)/?$ topic.php?id=$2&page=$3 [L,QSA]

    and it works!!! Cool.


    I found another mistake. The “topics-RSS” where missing because you deleted one rewrite mod too much. To repair this you need to put the following code just after the mod rewrites for “view”

    RewriteRule ^rss/topics/?$ rss.php?topics=1 [L,QSA]

    original code:

    RewriteRule ^rss/topics/?$ /forum/rss.php?topics=1 [L,QSA]

    Than also the rss-feed for the topics should work.

    #84171

    In reply to: Thanks plugin

    pengerik
    Member

    Please share if/when available! Been looking for this some time… :)

    #84170

    In reply to: Thanks plugin

    Gautam
    Member

    I had actually created this sort of plugin once for a forum, but didn’t release it publicly. When I get time, I might extract out that part and release it.

    Edit – If Paul doesn’t do it first :P

    #84169

    In reply to: Thanks plugin

    Michael
    Participant

    @paulhawke – sounds great, can’t wait to see it. :) Now, are you going to be making it a “like” this post, or a “thank you” for this post plugin?

    #76941
    chandersbs
    Member

    Thanks Chris and everyone, I will test Kevin’s code tonight and see how it works.

    Keep you guys posted :-)

    paulhawke
    Member

    I think there are a number of big architectural hurdles to get over. In WP I bind a given slug to a page on a 1-to-1 basis, and that’s what is used to resolve a given URL. If I have a forum I would want “virtual page slugs” where anything starting with (say) “/forum” is passed to my plugin for resolution of the rest. The URL processing in WP is messy (to say the least) and is a perfect example of the opposite of the “Open/Closed” OO design principle – “Closed to modification but Open for extension” – I imagine that a rewrite of that code would go a long way to improving WP itself.

    If bbPress were hosted on a single page using a WP shortcode, then the entire GUI needs to be re-coded to run fully AJAX as the user will need to remain on that particular page.

    #84295
    paulhawke
    Member

    Or, like me, you can grep the bbPress source for “do_action” and “apply_filter” to see what the code does. In any case, the code itself is the best documentation.

    #84327
Viewing 25 results - 22,201 through 22,225 (of 32,507 total)
Skip to toolbar