Jump to content

GuruMeditation

Members
  • Posts

    171
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by GuruMeditation

  1. I basically wrote my own comments system using regular pages. Works great and gives me full control of the content. The new Lister Pro is a great way to moderate them, too. Probably less lightweight than using the comments module, but I like to keep things consistent. I simply set the article as the parent page, and then sub-threads as children of other comments for that article. Makes it easy to manage using the admin. I'm currently writing a import script to get all my content from Disqus into this system, which is pretty straightforward thanks to the API.

    I actually do have a similar system to you in place at the moment for testing, but I'd much personally prefer the comments field to do it if I could. Plus I know Ryan's code will be secure, whereas mine might contain holes that I've not yet discovered.

  2. I was just wondering if there are any future plans to extend the comments field slightly?

    Obviously I know it should remain lightweight as it's a part of the core, but I'll chip in with my personal wishlist for it.

    Basically my number one wish is for the ability to link comments to member accounts. This would enable us to output their profile picture next to their comments, link their name to their profile, and basically output any information stored within their profile page (gender, age, location) alongside their comment, if desired.

    The ability to use permissions, roles / dynamic roles to determine who can can edit / post / delete their comments.

    An option to enable comment quoting on reply (like you can do with this forum). We could then use our own markup to style it etc.

    Finally, an easy way to determine what page comments are connected to. This would allow us to create a new page and loop through all the pages with comments, thus creating a very basic forum-style page. The latest version of muut follows along those lines by utilising comments to create a central hub or basic forum.

    Personally I reckon with these additions we will be able to use PW to easily create something like you see on the Muut page above.

    Thanks.

    • Like 1
  3. Thought some of you might find this interesting. Free and open source, and they will be providing migration scripts.

    98f79e7157dfae8f83d34934a56c7ac2_large.p

    Forums and mailing lists are a big part of the Internet. But the software powering them sucks. It’s clunky, bloated, complicated, and frustrating. Forum design hasn't really changed in the last decade.

    We want to take the concept of a forum — a concept that still has so much value in how we interact online — and start again. Not to add another layer on top of what’s already there. But to completely redesign the whole experience, focusing on how people actually use forums. And that’s exactly what we’re doing with Flarum.

    https://www.kickstarter.com/projects/1221714515/flarum-forums-reimagined

    • Like 4
  4. Sorry for my late reply to this. First question here would by why not just select Roles and then choose "newuser" in the select box? It doesn't seem like it's necessary to use custom (field=value) here. However, if you want or need to use custom (field=value) for some reason, then you would need to specify the property of roles that you are trying to match because "roles=" would require an integer of the role ID. I think what you intended was "roles.name=newuser" ? However, I really recommend just choosing "Roles" as your field and then select "newuser".

    No worries with the delay, I know you're a busy man :)

    Yeah that is now fixed, as Roles weren't showing for me at the time, but you fixed that issue a while ago.

    I've not been able to duplicate that here, but I do think I know how to fix it. Go to the DynamicRoles module settings and select the fields that should appear in your dynamic roles listing. It looks like you've got Title selected right now, which you don't want (since there is no title for dynamic roles). I would suggest selecting name and permissions. Please let me know if that fixes it?

    Adding the name field did indeed fix it. Maybe it would be an idea to have a note suggesting that we at least select the name field when we install it?

    Are you sure that "testuser" session had ended? (i.e. logged out and logged back in?). DynamicRoles caches some information about the user's access within the session (server side) at login. There's no way that the user can change that since it is all server side, but if you are making big changes to the access for a user that's logged in, they may not see those changes till their next session. Or you could clear the server side session files/db to force clearing of the cache. But I'll assume you may have already tried logout/login, so unless I hear back I'll try to duplicate here. 

    I have just tested it again on a clean install and in a different browser and it is still the same. If I log out and then back in, the page is still visible.

    Thanks for your time.

    • Like 1
  5. I have come across another issue. Maybe I'm overlooking something.

    I'm using the dev branch for the purpose of testing this module, so it's a fresh local install. Basically frontend pages are showing up when they shouldn't be. The steps I used are as follows.

    1. Create a new role called newuser.

    2. Create a new user called testuser and add this user to the newuser role.

    3. Go to the basic-page template and remove view access for guest and newuser roles.

    4. Log in as testuser and confirm that the pages using the basic-page template aren't visible via the frontend.

    5. As admin, create a new dynamic role with the following: name - Equals - testuser (for who), and template - Equals - basic-page (for the view).

    Now as expected, the pages using the basic-page template appear again. However, if I now go back into the Dynamic role settings and delete (template - Equals - basic-page) and then save, the pages using the basic-page template are still visible when logged in as testuser when they shouldn't be. The only way to correct this is to delete the whole Dynamic role, and then it works as expected again.

  6. This looks great. Thanks to all involved.

    However, I can't work out the following.

    I'd like to be able to create a role called newusers within Roles and then select all users who have that role via the use of Dynamic Roles. Then I can use the Dynamic Roles to select what that user group has access to as it's clearly more flexible. However, it seems when I choose custom (field=value) and input roles=newuser it doesn't work. The search tells me that members have been found (see attached pic), but when I click on the Show link, there are no results found. Also, it fails to save.

    post-2170-0-62372000-1404413440_thumb.pn

    Cheers!

  7. It's been debated a few times before.

    https://processwire.com/talk/topic/6468-symphony-forum-and-pw/

    https://processwire.com/talk/topic/3536-forum-integration-module/

    https://processwire.com/talk/topic/572-release-discussions/

    I'm currently working on a simple forum based on comments, but it's very basic and isn't a module, so it's not something I'll be releasing etc, it just fits in with my site.

    If you want a forum like this one, then you'll definitely be better off using dedicated software as suggested. But for a simple one, I'd advise to have a go yourself, as you will learn a lot. I've learnt so much since joining up here, I keep rewriting my code as there are always more efficient ways.

    • Like 1
  8. Hi Teppo,

    Thanks for the easy to understand explanation. I now know that session variables probably aren't the way forward. A lot of the time I over think things, and make life a lot harder for myself. But in the docs, session variables seem tempting.

    I think I'll have a look into JQuery and see if I can use GET as you suggested.

    Thanks again.

  9. Thanks for that.

    One of the scenarios I have is to allow my users to quickly edit some content from the front end. There will be an edit button on the page for a piece of content they can edit, and then when clicked I'll use Fancybox to pop up the content from the item. So I was planning to use a session variable to temporary store that content, and then when they have cancelled or updated the content, the session variable will be cleared.

    I'd also use it to allow my users to quote text for the custom comments system I have in place. So again there would be a quote button, and that content would be stored in a session variable to be used in a textarea etc. It would then be cleared when the task is complete.

    So would this be a yay or nay? It just seems a straight forward and clean method to use, but I don't want to misuse it if it's not meant for things like that.

    Thanks.

  10. Hello, I've searched the forums and API page etc, but I've not really found a great deal of information regarding $session->hello = "Hello World!"; etc. I know what it does, but I don't know the technicalities of it. By this I mean, is it safe to temporarily store a couple of paragraphs of text in a session variable while a page is redirected for example?

    e.g

    $session->quotedText = "A couple of paragraphs of text would go here.....";
    $session->redirect($someUrl);
    // Get the stored text from the new page
    $value = $session->$quotedText;
    Echo "Quoted text from the previous page... " . $value;

    I can't see anything wrong with this idea, but I'm probably missing something as I can't seem to find many uses of it?

    Is this an improper use for session variables?

    Thanks.

  11. Hi all,

    I'm having a weird problem with Hanna Code on a page that has Allow Page Numbers? checked in the template settings. If I don't have that setting checked, everything works as expected.

    So, I have a template called article_full which is attached to all article pages. It displays the full article and I use Hanna Code to show a list of recent articles in a side block within that template.

    Why do I need Allow Page Numbers active? Well basically I have my own comments system in place, and all the comments for that page are displayed at the bottom of the article. I need it active for the pagination for these comments.

    The problem?

    If I disable Allow Page Numbers, the block of recent articles will be displayed correctly. If I enable Allow Page Numbers and go to page2 of the comments at the bottom, the recent articles are not displayed.

    Below is my Hanna Code, which is simple enough.

    <?php 
    $articles = $pages->find("template=article_full, limit=5, sort=-created");
    echo "<ul>";
    foreach($articles as $article) {
        echo "<li>" .
             "<a href='{$article->url}'>{$article->title}</a>" .
             "</li>";
    }
    echo "</ul>";
    

    Now I have a rough idea as to what is going wrong, but I have no idea as to why. Possible bug?

    Notice the limit here is 5. So that will pull a maximum of 5 articles for the recent articles block. But I currently only have 4 test articles, so it displays those 4 as expected. But if I now go to page2 via the comments, the recent articles block is empty. It's like the Hanna Code continues on from the last article found, rather than running the code from fresh. I can confirm this by changing the limit to 2. As expected, the main article page displays two articles in the recent articles block, which I will refer to as art1 and art2. Now if I go to page2 I get art3 and art4, rather than art1 and art2 as expected.

    I can't see anything wrong with my code, so I assume there is some kind of conflict with page numbers and Hanna Code?

    Cheers.

×
×
  • Create New...