Jump to content

GuruMeditation

Members
  • Posts

    171
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by GuruMeditation

  1. You should take a look at Soma's great gist about building frontend forms from fields of a template (or page).

    This code also pulls in all the dependencies you need for asm page fields, image fields etc.

    It also takes care of server side form validation.

    Only thing you need to add is sanitation of the form values.

    I have used this code as a base for several frontend forms (even complex ones) and it is working great.

    That's actually very straight forward for what it's doing. A couple of questions.....

    1. Is it possible to use a UI framework i.e UIKit etc? Or is it a lot of work?

    2. When you mention sanitizing, do you have any example code?

    Thanks for the info

  2. @cs

    @GuruMeditation,

    1. You and everyone on this forum are an important part of this ProcessWire Community.
    2. Learning the many things about ProcessWire can be difficult, I know it's taken me a long time.  I'm still learning about module development.
    3. I would hope that you don't give up or think that your concerns have no merit.  The fact that you bring them up, means that we are made aware and I know there are many people on this forum willing to help with anyones understanding.
    4. Everyone's level of understanding is different, however I believe you will get there.
    5. Things in ProcessWire are changing all the time, unfortunately the documentation doesn't always translate into concepts that novices (me included) can quickly understand.  I know I work with things and eventually the lightbulb comes on and I can move on.
    6. Finally,  ProcessWire is a great tool that can help you do many things. There are many things to learn and I hope that you will continue to ask questions, as we all learn something new when people give freely of their knowledge as they do on this forum.

    I can't argue with anything you have said. I agree with it all. I just think the documentation could be improved and also tools could be developed to make module development easier and also more secure. PW will become more popular over the next few years, and I'd hate to see an influx of badly written insecure modules due to a lack of documentation. I also appreciate your feedback. PW is without a doubt the best CMS / Framework out there, and believe me I've tried them all. That's why I get passionate about these issues.

    • Like 3
  3. I probably came across as a bit negative but that wasn't my intention. To make my point clearer, I suppose what I'm getting at is this: As a novice, the OctoberCMS plugin looks a lot more appealing to me as it appears to take away the mundane tasks of creating a module/plugin with a visual tool. To create a module in PW, you need to trawl through the code or the forum. As for what module I'm creating, well it can be found here. I have spent a lot of time on that module, most of which involved searching the forums and looking through other modules for the answers. It's a shame because PW is so simple to use, but the information and documentation is lacking in my opinion. But I'll go with the majority and admit that PW is probably too advanced for me personally in this respect. I can understand most things that are documented correctly, or have tools to take away the tedious elements, but sadly PW lacks in these areas (to me).

    Take that as you will, but it is just my opinion.

    If you're still looking for an example of what I mean, then I'd probably mention the lack of information regarding installation, uninstallation and upgrades when creating a module. I've lost count of the amount of times I have tested my module only for things to break because I made a mistake. And when my module breaks, the whole site breaks, leading to me having to delete all my module information from the database to get it back up and running.

    • Like 1
  4. There doesn't seem to much in there that ProcessWire doesn't already have in one form or another.

    What, specifically, would you hope an equivalent PW module would achieve?

    This is where PW frustrates me. I'm currently writing a module, and I am by no means an expert like most people on here, but writing a module in PW is a game of trial and error and a pain in the arse for idiots like me. I've had to look through other modules and core files to find what I'm looking for (are new users going to bother looking through the core code for the information they need?). There's a serious lack of documentation concerning module creation. I really don't see a PW module that can compete with the OctoberCMS plugin to be honest in terms of simplicity for creating other modules. As far as I can tell from the video, OctoberCMS makes it easy to create custom plugin database tables that keep all the plugin data within that table as rows. From what I've gathered with PW we need to delve into the world of Fieldtypes, and that isn't an easy task. But what do I know, I'm retarded when it comes to all this.

    • Like 1
  5. I'm sure a lot of you are familiar with October CMS. It reminds me of PW in a number of ways. Anyway, they are currently developing the Builder plugin which is basically a plugin that makes it easier to create other plugins. I'm sure most coders on here wouldn't need anything like this, but for us novices it looks great.

    A List of features:


    * Initialize a plugin
    * Create and edit plugin database tables
    * Create model classes
    * Create back-end forms and lists
    * Manage plugin permissions
    * Create back-end controllers
    * Define back-end navigation menus
    * Manage plugin versions, migrations and database seeder scripts
    * Manage plugin localization files

    And more! It's coming soon!

    Does anything similar exist for PW? If not, could it possibly attract new novice users to create modules? I personally like the database table creation.
     

    https://www.facebook.com/octobercms/videos/vb.558195297627271/972023579577772/?type=2&theater
     
    Thoughts?

  6. Hi all,

    With December being a busy month for me, I'm not had time to work on this. I should have more free time during the New Year. I'll hopefully then be able to throw up some code (Github) for others to look at and tear apart etc, and a demo etc.

    @pwFoo HBB will also be lightweight at the core, with just the needed features for a basic forum. As you say, plugins/modules etc could add other functionality if needed. I won't be adding features like tags, likes, notifications etc into the HBB core as PW can handle all of that in a variety of ways, and people may already have modules installed that could be utilised for that purpose. My plan is to make it all doable for the forum member from the frontend, i.e for them to be able to post and edit their content without ever seeing the admin area. How this is done via the frontend will be up to the developer of the site that HBB is installed on. This will allow people to use whatever frameworks/scripts they want for the frontend and then HBB can simply store the data when requested.

    Well that's my big plan at least. A simple forum that can be extended in an unlimited amount of ways thanks to the power of PW. I love the fact that I can just add a new field to the user template, i.e for a profile picture and then this can easily be used for HBB if needed.

    Anyway, I'll throw up some code soon enough, and then everyone can see whether or not I'm on the right track.

    • Like 2
  7. Kongondo, I've just read through your posts again, and it all makes sense to me. I'm sorry if my response made it sound like I hadn't taken in what you said, it's just all new to me at the moment :lol:

    I was wondering if I could send you a PM regarding a very simple and minimalist Fieldtype example I have in mind. I am keen to get my head around them, and if you can spare some free time I would really appreciate it. If not, I understand and you've been more than helpful. But I would really prefer to use Fieldtypes to store some of the data.

    • Like 2
  8. I know the feeling :-). ...If you haven't worked with Fieldtypes before, there is some learning curve..Onto the main question, given the task involved in developing a forum (depending on whether it is basic or has advanced features, is modular, etc.. [have a read here btw]), I think we have about 3 options:

    1. Given the time constraints we (most of us) face, proceed as you originally intended. A basic forum is better than none :-)
    2. Ask guys who has some time to spare if we shared the work, e.g. somebody to deal with the model (data), another to deal with permissions and security, another with membership + login, another with...etc...
    3. If there is enough demand for a more than basic, scalable  modular forum, and the community is willing to raise some funds to support its development, get a couple of heads (and hands!) together to work on this thing. The sponsorship really would be about compensation for time taken away from client work.

    #3 is probably the most difficult to organise but if it works, would probably bear most fruit.

    These are just my thoughts. Don't feel pressured by any of them :-). Even if we ended up taking option  #1, I'd welcome it. You've made a good start and yours is probably the attempt that has come farthest to date (IIRC). So unless something shifts soon, I'd go ahead and release your module as is. It's not the end of the world if it doesn't have native Fieldtypes  :P  :lol:. It is a working solution. We appreciate your efforts and thank you for giving it to us gratis  ^-^  :)

    I know the topic regarding a forum solution has popped up a few times, and I understand that existing solutions are often better suited. However, I just love PW and wanted to have a go at creating a forum module, as I'm becoming more familiar with how PW works. My plan was never to create a forum like this one, but rather a forum that could utilise the power of PW to handle membership, permissions, which in turn would save a lot of time. Basically a functional forum that isn't bloated and doesn't get in the way of the front-end design. Nothing too fancy, but something that has the expected features. I also wanted it to use the same principle so that it can be used to add comments to other pages etc.

    At present, the forum has potential, but obviously one of the main issues is the amount of installed fields, but custom Fieldtypes are beyond me at the moment. I like the idea that everything is a page as it makes it easy to deal with, but I'm always open to criticism and suggestions.

    I'd love others to get involved with this as I can see it as a useful addition, but I understand that people don't always have the time. So maybe I will keep tinkering with it and keep the updates coming here, but if others are interested in joining in, we can take it from there.

    Again thanks for your comments and encouragement as it means a lot.

    I also started with "discuss" a simple, extendable forum module based on PW pages few month ago, but stopped work in favor of Flarum (Demo). I like the EsoTalk successor and maybe start an integration for my small forum site instead of a native PW forum...

    Yeah, I've been watching Flarum since it was announced and it's looking great. I'd just prefer a PW alternative though, just to keep everything feeling the same.

    • Like 4
  9. Feedback like that is always appreciated. Custom Fieldtypes certainly make sense and you're certainly not raining on my parade, as I would want the module to be done correctly.

    I will admit that I know nothing about creating custom Fieldtypes, and my PHP coding level isn't on par with most people on here. So I'm not sure where to start with that as I can't seem to find any documentation on it?

    Thanks for the comments.

    • Like 1
  10. Thanks for the feedback. It's always appreciated.

    My plan is to create a module with minimal code at first, and hopefully others can add to it so that together we can make this something stable and easy to use, with all the features we'd expect. One thing I don't want is a bloated mess.

    I'm curious to find out what you all think about fields. A forum module obviously has the potential to install a lot of fields. Personally I don't mind if those features are useful, but I'm interested hearing what you think. HermodBB currently installs 21 fields, and these range from storing the IP address, to storing who has viewed the topic, and to storing the permissions for a per-forum based permission system. Some people will consider 21 fields to be bloat, but a forum obviously needs to store a lot of data. So what are your views? I have made sure that fields are grouped in a logical manner so that they're not all over the place.

    post-2170-0-94734300-1446325220_thumb.pn

    *field names are still likely to change, but you get the idea :D

    • Like 2
  11. Just to update those following this thread on the status of the module. I am still working on it, and I'm currently tidying things up :)  I'll provide a few template examples when I release the module so that you can easily have a forum up and running within a limited time.

    My main priorities at present are the following:

    1. A clean installation

    2. A clean uninstallation

    3. To plant the acorn, and for PW to grow the tree.

    I personally like to know what a module installs, so I'll provide that information at a later date for those that don't want to dig through the code. It's going to be as minimalist as possible, but it's also going to do everything a forum should do, and that's all thanks to PW and the excellent API.

    Below are some extra shots of my test installation. You can see the root of the forum, and then the forum view. I have added forum categories since the last time, so forums can now be grouped, i.e Member forums, guest forums etc. Those forum groups also have view permissions, so with some API magic, all the forums within that forum group can easily be hidden for specific roles without having to hide them individually.

    Again there is no markup provided for this module, so it's up to you how it renders. I am currently using UIKit for testing purposes. Anyway, here's the shots..... (red writing is not part of the screenshot)

    ------------------- Main (root forum view)

    post-2170-0-38418700-1446250317_thumb.pn

    ------------------- New User Forum (from the New Users forum group)

    post-2170-0-05134800-1446250327_thumb.pn

    -------------------

    Questions, ideas etc still always welcome. And yes I will release the code shortly when I have ticked off all my to-do boxes. As you can see from the last screenshot, the forum topics are ordered by their last reply. I've made this easy to do via an extra date field, so they'll be no need to worry about comments or topic order for that.

    Again you can pull the comments, topics etc however you wish. I have made it paramount that I don't include any restrictions. All my recent test helper methods have now been removed from the module.

    • Like 7
  12. Is there any way I can send you money?

    (On some occasions I believe I have threatened to send money to someone brave enough to take a stab at creating a PW-based forum solution)

    Thanks for the offer, however I don't feel that HBB warrants any sort of payment as it is essentially a simple module.

    This looks great, I'd love to see a full forum system:) Well this is exciting, mind sharing some code or a github so that we can take a peek? The structure looks like it makes sense. 

    I will indeed give access to the code shortly. I'm not sure if it'll dissapoint, but I'll let you be the judge of that.

    I am interested in finding out what features people would like included. I'm keeping it as simple as possible, but so far there are fields to store the following information:

    Author's IP address & user agent string

    Topic / comment message content

    Creation / edit date (if edited)

    Pinned status

    Locked status

    Who has viewed the topic

    Which members can view the topic (ideal for private messages)

    The $page ID of the comment for reply status reference

    I'm toying with the idea to add fields for images and attachments, thus allowing the option to store images or attachments with comments, a bit like you can do with this forum.

    • Like 3
  13. Hi all,

    I thought I'd take this opportunity to announce a module I've been working on for a private project. Although it's not yet complete, I thought I'd take the time out to see if anyone would be interested in it. I only have the module locally on a test site, so if there is any interest, I can upload it somewhere suitable and maybe others can add to it, provide feedback etc.

    What is HermodBB?

    Hermod (messenger of the Norse gods) BB (Bulletin Board) is a module that installs a selection of templates and fields that you'd expect for a frontend forum. It also provides some methods to easily save topics and comments.

    All topics and comments (replies) are simply pages, and are organised like can be seen in the following image.

    post-2170-0-05457900-1444938262_thumb.jp

    Each forum has checkbox permissions for viewing, posting, pinning etc (see image below).

    post-2170-0-20860700-1444938516_thumb.jp

    These permissions can then be verified with some simple code (see below).

    // Use the helper method to pull a list of forum pages
    $forums = $hbb->forumsRender(); 
    
      foreach ($forums as $forum) {
    
        // Only show the forums to those that are allowed to view them
        $rolesForumView = $forum->hbb_forum_view;
        if ($rolesForumView->has('id=' . $user->roles)) {
          // User has view access for the forum
        }  
      }

    HermodBB also makes it easy to add comments to other pages, i.e articles, blogs etc. Comments are added as sub-pages, just like they are for topics.

    What HermodBB doesn't do

    HermodBB does not dictate any markup or sanitization. Any sanitization method can be used, and each topic and comment can easily be rendered as required. I'm currently using UIkit and CKEditor, but this can easily be changed to Bootstrap/Foundation etc. It keeps everything simple so that Processwire can do all the heavy lifting.

    Note:

    I am aware that there is the excellent comments module by Ryan, and also the Discussions module by Apeisa, but I needed something a little different for my current project, so I decided to have a bash myself. I am by no means on the same level of coding as the majority of members on here, so please be gentle :)

    I'd also like to thank Ryan personally for such an excellent framework.

    Any questions etc, please feel free to ask.

    • Like 19
  14. Sorry for the double not that nice posts. I didn't LostKobrakai's answer before I posted mine.

    Anyway, thanks for the suggestion :)

    ​No need to apologise, it just looks like a powerful library when reading through the docs, so I was just wondering what people thought etc.

  15. I've just been reading up on the s9e textformatter, and it looks really useful for front-end forms etc. I can't however see any information on it anywhere on the PW forums. Is there are reason for this? Does anyone plan on making a textformatter for it?

     Text formatting library that supports BBCode, HTML and other markup via plugin. Handles emoticons, censors words, automatically embeds media and more.


    https://github.com/s9e/TextFormatter

    ​Thanks

  16. Hi all,

    I plan on adding some basic analytics to a site I'm working on. Piwik would be overkill as I only plan on logging what pages members have viewed, along with the time and other basic information.

    But what would be the most efficient way to go about it? This site is on a shared hosting account, although it is a reliable shared hosting company, and it can handle a couple of thousand members accessing a forum etc without any problems.

    Personally I'm thinking of using the $log API variable to store this information, but was curious what others thought.

    Thanks

  17. There's Luna which might be worth a look. It's active, lightweight and has all the features you'd expect.

    Luna is an open source board software app released under the GPLv3 license. The goal of this project is to be light and small, yet fully functional for a good board. Everything else is up to plugins. Luna is the successor to ModernBB, and allows users to upgrade from ModernBB 3.7 just as easy ModernBB-updates where.

    https://github.com/GetLuna/Luna

    http://getluna.org/index.php

    • Like 2
×
×
  • Create New...