Jump to content

GuruMeditation

Members
  • Posts

    171
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by GuruMeditation

  1. You should create a variable called $fairyballs, and then explain to her that your $fairyballs variable is giving you ballache.
  2. I just usually do something along these lines.... <?php $thumb = $page->cropimage->getThumb('thumbnail'); echo "<img src='{$thumb}' alt='{$page->cropimage->description}'>"; ?>
  3. 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.
  4. 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.
  5. Swab the decks, ye mutinous architect. We'll plunder yer blueprints and use 'em as underpants.
  6. Surely it has to be pirates? Blackbeard Calico Jack Henry Morgan Sir Francis Drake
  7. Thought some of you might find this interesting. Free and open source, and they will be providing migration scripts. https://www.kickstarter.com/projects/1221714515/flarum-forums-reimagined
  8. I have just tested it, and everything seems to be working fine now. Thanks Ryan. If it's one thing I'm good at, it's breaking things. So if I break anything else, I'll let you know.
  9. 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. 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? 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.
  10. I don't know if any of you are aware of Bolt CMS, but it reminds me a lot of PW. I've tested it a few times, but I prefer PW. Anyway, they have a snippets section which I found useful. https://snippets.bolt.cm/ I assume the OP is referring to something along those lines? If so, it gets a +1 from me.
  11. Just to answer my own question, no it's still the same. Also, I have just installed the latest PW build https://processwire.com/talk/topic/3768-processwire-dev-branch/page-11#entry71331 and I can no longer edit Dynamic Roles as there is no edit link to click.
  12. Hi, does anybody know if the above issue still exists with the latest builds?
  13. 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.
  14. Hmmm, I can't find "roles"? Should it be in the menu where you find custom (field=value)?
  15. 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. Cheers!
  16. 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.
  17. 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.
  18. 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.
  19. 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.
  20. Thank you both, ceil() did the trick. I was doing something stupid.
  21. Hello, I've seen some code on the forum, but it doesn't seem to work for me, or I'm using it wrong. I'm after a simple way to find out how many pages there are for a certain pagination, or the last page number. Thanks.
  22. start=0 did indeed do the trick. Thanks for the speedy solution.
  23. 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.
  24. I see what you mean. I just logged in and it redirected me to the following. http://www.hostinger.co.uk/error_404? However, clicking on the edit button on the following page seems to work. http://www.superguiabrasil.com.br/guia/
  25. It's not wise to publicly give out your login details in an open forum. Is the 404 error showing in the admin area? Did I read right, you purposely tried to mess up PW to see how it works?
×
×
  • Create New...