Jump to content

BeardedCanadian

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by BeardedCanadian

  1. So I have been slowly working on migrating content from my old site to my new PW site. One of the things that I would really like to impliment is a way of restricting access to some content. In particular, I have certain family content (i.e. kids photos, videos, etc) that are really only for friends/family. Can someone outline the best way of accomplishing this? I'm still a n00b at PW. I've found this thread which describes how to restrict content for a whole site and I'm already using this module to restrict access to some pages to my local network. Ideally, I'd like a graceful fallback so if an unauthorized person tries to view content so they would be given a polite message and a login prompt. I'd be grateful if someone could walk me through what the best approach to accomplishing this. Thanks everyone!
  2. I have worked my way through the available tutorials on setting up a basic blog and gallery and I'm slowly translating my EE site into PW. A few questions about the best way to do a few things in PW. In my current blog, EE has a variety of built-in ways for returning all the channel entries written by a specific author, those written on a specific date, those with the same category, and there is a module for returning entries that share folksonomy tags. As I understand it, searching by author, category and date could probably be handled by URL segments but I've not seen much in the way of universal examples. Any ideas/examples on handling the tags? As opposed to using URL segments and returning results in my blog-index page, I'm also toying with the idea of using the search api to do all of the above. Are there any disadvantages to doing this?
  3. A quick permissions question. I have this module installed and it works fine for the superuser. Are there any tricks involved in allowing another user to use this admin panel, i.e. I would like users with the role of 'author' to also see/use it.
  4. One small issue with the above is again the reference to $tweet->id rather than $thought->id. Otherwise, it's perfect. Exactly what I needed to get started.
  5. @diogo, that was it. Seems what I pulled down online from the dev branch is missing that line. Thank you very much for the example above
  6. Thanks so much for the help. I'm trying this on a new copy of ProcessWire 2.3.4 which I downloaded yesterday. I'm using these instructions for adding the admin page: Create a new template with a file (name it whatever you wish) In the advanced settings insert "admin" as the Alternate Template Filename Create a new page under "Admin" and give it the newly created template Doesn't exist In the template file you can use PW variables as in any normal template (yes, pretend you didn't change the file in the settings) Still seeing the same message, "This page has no Process assigned." At the risk of being verbose: 1) Create a new file /site/templates/thought.php with this code: <?php if($input->post->thought) { $thought = new Page(); $thought->parent = $pages->get("/thoughts/"); $thought->template = "thought"; $thought->name = time(); // page name can be a timestamp, this will make it unique $thought->title = substr($input->post->thought, 0, 30); // let's make the title match the first 30 characters of the thought $thought->body = $input->post->thought; $thought->save(); // confirmation message with link to edit the new thought echo "<p>A new thought was created. Edit it <a href='{$config->urls->admin}page/edit/?id={$tweet->id}'>here</a>.<br>Create a new one?"; }?> <h2>Write a new thought</h2> <form action="" method="post"> <textarea name="thought" rows="4" cols="50"></textarea><br> <input type="submit" value="Send"> </form> 1b) Create a new template using this file 2) In the template settings I added the 'body' field to the pre-existing 'title' field. 2b) In the advanced template settings enter 'admin' as the Alternate Template Filename. 3) I create a new page under "Admin" in the tree titled 'New Thought' and assigned the 'thought' template I just created. 4) I now see the 'New Thought' listed on the right in the topnav navigation menu, but when I click on it I see, 'This page has no Process assigned'.
  7. Thanks for the input. @diogo, any chance you can walk me through a basic example of how to set this up or point me to a thread that describes how to use the API to accomplish something similar? After installing your custom admin page module, I'm greeted by a note stating, "This page has no Process assigned."
  8. Hi all, I've been using EE 1.x/2.x for my personal website for a long time and I'm looking at switching to PW for a variety of reasons. I have a sand-boxed version installed and I have been working through a few of the tutorials. At this point I'm investigating how difficult it will be to re-impliment what I have. I am good enough with perl/SQL that migrating my previous content isn't too much of a concern. One of the things I cannot quite get my head around is how best to reimpliment a 'thought' and 'links' section of my current site. Thoughts are basically, tweet-like ramblings that I write while links are a simple url (which are associated with a datestamp, but nothing else). In the basic and news article tutorials, an author is always presented with a two-step entry process where the 'Title' and 'Name' slug for each page is first entered and a 2nd step where the content is entered. This works fine for blog posts/articles as these warrant a slug url. However, for 'thoughts', 'links' and 'quotes' I would really rather not have a 'Title' or a 'Name' field at all as these are intended to be quick entries. From a little digging, I gather that each page in PW is expected to have a 'Title' as it is marked as a global field and this is used to fill the 'Name' slug which maps to the page ID. Is there an easy way around this? In terms of fields, I want: Thoughts: - Simple line of text, limited to 512 characters - datestamp entry Quotes: - Simple textarea - Quoted author - Quoted date - datestamp of entry Links: - url - Simple line of text, limited to 128 characters, describing the url/link. - datestamp of entry Thanks for the help.
×
×
  • Create New...