1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

[pfps.com.br] Bookmark Posts

Discussion in 'Add-on Releases [Archive]' started by Fuhrmann, Oct 10, 2011.

Thread Status:
Not open for further replies.
  1. Fuhrmann

    Fuhrmann Well-Known Member

    Bookmark Posts 1.2.1

    Suggested here: http://xenforo.com/community/thread...ts-for-future-reference-bookmark-center.1472/

    For those who use this plugin on XF 1.0.4 see this: http://xenforo.com/community/threads/pfps-com-br-bookmark-posts.21166/page-2#post-273825

    Installation
    1. Upload the js, library, style directories into your XenForo's
    2. Import the addon
    3. Configure user group options in Users > User Group Permissions > Bookmark Posts
    4. Go to AdminCP>Options>Bookmark Posts and set the options
    Upgrade
    1. Upload the js, library, style directories into your XenForo's
    2. Choose Upgrade in AdminCP
    3. Configure user group options in Users > User Group Permissions > Bookmark Posts
    4. Go to AdminCP>Options>Bookmark Posts and set the options
    Please, give me your feedback. Suggestions, bugs!

    Changelog:

    1.2.1 (26/10/2011)
    - Now this add-on suports friendly url
    - Added a description to the bookmarks homepage template
    - Bug fixes

    1.2.0

    - Homepage to show the latest bookmarks/most bookmarked posts (very simple)
    - Added a option to chosse between icon, icon/text and only text.
    - Option to choose the ammout of bookmarks to show in homepage
    - Filter tags globaly
    - Option to hide the content of the post in the account
    - New 'View' page. View the bookmarks.
    - Option to show the activity of bookmarking in the news feed.
    - Fixed bugs
    - A LOT of internal changes.

    1.1.0
    - No icons anymore. I had some problems with it.
    - New options in the AdminCP.
    - Now you can edit bookmarks.
    - Tag bookmarks.
    - Write a note in the bookmark.
    - 'Share' changed to Public. Now you can make a bookmark 'Public' or 'Private'.
    - Search all over yours bookmarks.
    - Search only in certain tags.
    - Two styles to choose of the post message bookmarks.
    - Filter bookmarks by tag. One click.
    - Import notes from the add-on 'PostIt'.
    - Choose the default state of the bookmarks.
    - Choose the default tag of the bookmarks.

    1.0.0 BETA
    - Bookmark posts for future reference
    - Share your bookmarks to your profile
    - Allow certain usergroups to "can bookmark" or not

    NOTE: The importer still is presente in the Installer. But, for now, i have disabled it. If you want to show the importer Posts-It, open the file library/BookmarkPosts/Installer.php and uncomment this:

    PHP:
    /*If ($db->fetchRow('SHOW TABLES LIKE \'postit_content\''))
            {
                $db->query
                        ('
                        INSERT IGNORE INTO xf_bookmark_posts
                            (user_id, post_id, bookmark_date, bookmark_tag, bookmark_note, bookmark_state)
                            SELECT postit_user_id, content_id, postit_date, \'Imported\', postit_note, \'private\' FROM postit_content
                        ');
            }*/
    Sem título.png Sem título3.png Sem título.png Sem título.png Sem título.png Sem título.png Sem título.png MaisUmSem título.png

    NOTE2: I STRONGLY recommend, if you already has this add-on installed, to uninstall and install again. There is a lot of bugs fixed and some permissions set.
     

    Attached Files:

    turtile, Morgain, Romchik® and 18 others like this.
  2. Forsaken

    Forsaken Well-Known Member

    The icon looks out of place to me.
     
    Fuhrmann likes this.
  3. CurveGotti

    CurveGotti Active Member

    I was considering doing something like this for one of my forums, thanks for saving me some time :)
     
    Fuhrmann likes this.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    I just installed this to test it out.

    The image paths use \ instead of / so none of the images load.

    In addition, the images need to be uploaded to the /default directory.

    I've deleted mine as I have no need of it, as have probably a few others.
    I would recommend moving the images out of that directory.

    Other than that, nice work.
     
    CurveGotti and Fuhrmann like this.
  5. Fuhrmann

    Fuhrmann Well-Known Member

    All changes were made. I updated the main post with the new version! Thanks!
     
    Veer, CurveGotti and Brogan like this.
  6. Dynamic

    Dynamic Well-Known Member

    Thanks for this :D
     
    Fuhrmann likes this.
  7. M@rc

    M@rc Well-Known Member

    This actually looks pretty cool.
    Congratulations on your third add-on, (y) . I just somehow feel the fourth is going to be good as well, :cool:
     
    Veer and Fuhrmann like this.
  8. dieketzer

    dieketzer Well-Known Member

    will this import bookmarks from the other bookmark addon?
     
  9. Fuhrmann

    Fuhrmann Well-Known Member

    Can you tell me another bookmark addon? Maybe i can look into to make this work.
     
  10. dieketzer

    dieketzer Well-Known Member

    this one
    http://xenforo.com/community/threads/post-it-posts.17461/
    the creator spit the dummy and left some of us with a dead-end addon. id love to update, but i dont want to delete users' existing bookmarks.
     
    Fuhrmann likes this.
  11. AndreaMarucci

    AndreaMarucci Well-Known Member

    Good work. I've installed the post-it addon but the link above appear outdated. Where is gone this mod?
     
  12. dieketzer

    dieketzer Well-Known Member

    the author removed it.
     
  13. AndreaMarucci

    AndreaMarucci Well-Known Member

    Bad news...

    I'll remove it on my board and install this one instead. Fuhrmann do you think you'll support and update this mod at least for a while?
     
  14. Fuhrmann

    Fuhrmann Well-Known Member

    I am developing right now. Maybe saturday i realease a new version with more features.

    Also, a importer for who uses the Post-It addon.
     
    principia, dieketzer and Veer like this.
  15. AndreaMarucci

    AndreaMarucci Well-Known Member

    Wow fantastic. I'll wait so I can import all the previous bookmarks. Thank you very much...
     
    Fuhrmann likes this.
  16. Brogan

    Brogan XenForo Moderator Staff Member

    I spotted a few more bugs in my testing.

    The phrase x_do_not_have_any_bookmarks should be does not have any bookmarks.

    The share and unshare this icons were a bit confusing at first, I thought they were sharing with social networks.
    I'll probably remove those icons and replace them with Make Public/Private links.

    Likewise with the star icon, I'll probably just replace it with a Bookmark link, to match the other public controls in a post.
     
  17. MGSteve

    MGSteve Well-Known Member

    Superb, another one to add to my forum, thank you :)
     
  18. ragtek

    ragtek Guest

    Some suggestions if i'm allowed to:p

    Why do you do this in the account controller?
    PHP:
            foreach ($bookmarks as &$bookmark){
                
    $bookmark['user'] = XenForo_Application::arrayFilterKeys($bookmark, array(
                                    
    'user_id',
                                    
    'username',
                                    
    'gender',
                                    
    'gravatar',
                                    
    'avatar_date',
                                ));
                
    $bookmark['post'] = XenForo_Application::arrayFilterKeys($bookmark, array(
                                    
    'post_id',
                                    
    'username',
                                    
    'gender',
                                    
    'gravatar',
                                    
    'avatar_date',
                                ));
            }
    inside of the controller?

    1. I would create a "prepare Method" inside the bookmark model which does this. This stuff shouldn't be handeled in the controller / controller isn't responsible for this;) If you want to do this on an other place, you'll have ugly c&p code;)
    edit: you have it already:p you're having the same stuff in member and account controller
    If you need a example, check attachmentmodel::prepareAttachment or usermodel::prepareUser
     
    CurveGotti and Fuhrmann like this.
  19. ragtek

    ragtek Guest

    Next one:

    Instead of including the template ALWAYS and check inside the template if the user is allowed creates IMO unnecessary overhead. Yes it's minimal, but you don't need to create a template object if you don't need it)
    Code:
    <xen:if is="{$canBookmarkPost}"> <li>  <a class="{xen:if "{$selectedKey} == 'alerts/bookmarks'", 'secondaryContent', 'primaryContent'}" href="{xen:link account/bookmarks}">{xen:phrase your_bookmarks}</a> </li> </xen:if>
    
    PHP:
    case 'account_wrapper_sidebar_your_account':
                    
    $ourTemplate $template->create('account_bookmarks_link'$viewParams);
                    
    $rendered $ourTemplate->render();
                    
    $contents .= $rendered;
                    break;
    could be handeled direct in the template hook via:
    PHP:
    case 'account_wrapper_sidebar_your_account':
          if (
    $model->canBookmarkPost()){
                    
    $ourTemplate $template->create('account_bookmarks_link'$viewParams);
                    
    $rendered $ourTemplate->render();
                    
    $contents .= $rendered;

    }                break;
    this makes also sometimes debugging easier because you don't run unnecessary code
     
    CurveGotti and Fuhrmann like this.
  20. lazer

    lazer Well-Known Member

    Useful - following developments.
     
Thread Status:
Not open for further replies.

Share This Page