WEB Drupal help please

Discussion in 'OT Technology' started by DnA02, Feb 6, 2009.

  1. DnA02

    DnA02 Hey, how YOU doin?! OT Supporter

    Joined:
    May 27, 2004
    Messages:
    1,914
    Likes Received:
    0
    Okay i've been trying to make a website similar to www.grouphug.us and I'm not too familar with Drupal. I know theyre using Drupal so how do i make a clone? I cant seem to get my frontpage to work the same way as theirs.

    How do I set up the frontpage so that when anonymous users submit stuff, it would show up on the front page with the node number as the title (or have no title/node show at all) and what they say as the content?

    This is making me:run: cause i feel its something really simple and I'm not getting it


    Kingtoad: i did what you suggested but im a noob so i wasnt sure what i was suppose to do with the template overide and the link you gave me
     
  2. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,914
    Likes Received:
    8
    Location:
    Los Angeles
    You'd likely want to create a custom node type to get the functionality exactly similar to Grouphug.us. But you can technically do it without writing any code using modules, but for the sake of cleanliness and customization, I would advise doing so.

    Grouphug.uses has done several things here. Let's talk about the node aliases. Firstly, every single post on Grouphug.us uses a unix timestamp (not node id) as the title. They probably utilized the module Pathauto to create node aliases for timestamp to link directly to the node.

    Secondly, you can accomplish the front page output similar to Grouphug.us utilizing Views. Views is a module that allows you to custom tailor complex queries to run on your database then output the data accordingly.

    For the anonymous posting, they could have done one of several things. The easiest way to do this would open up the node.tpl.php file and remove the $submitted variable. This variable outputs the string "so so has submitted this on etc". Either that, or you can utilize a theme override to override the theme_username() and return a null value rather than the linked username.

    You can accomplish any of these things above in a number of different ways and still get the desired result. Just depends how you go about doing it. If you're not much of a coder, the views route would probably help you a lot. Take a look at the Views tutorial if you need it.
     
  3. Ozi

    Ozi Active Member

    Joined:
    Apr 19, 2005
    Messages:
    4,157
    Likes Received:
    0
    ya, what he said....all jibberish to meh
     
  4. DnA02

    DnA02 Hey, how YOU doin?! OT Supporter

    Joined:
    May 27, 2004
    Messages:
    1,914
    Likes Received:
    0
    okay so ive been messing with Views and Drupal core. This is what i got so far:

    www.drupal.snatchporn.com (safe for work except the domain)

    when i try to create a humor content as an anonymous user, i get a "page not found" after i enter in stuff and submit and then a "n/a" is created on my frontpage...this problem doesnt happen if i am logged in.

    also how do i utilize views with the humor category? i created a "view block" and put the block into the content section, i then allowed anonymous/registered users to see the block...but i dont see anything happening. I set "items to display" = 3. I have more than 3 items on the front page so :dunno:
     
  5. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,914
    Likes Received:
    8
    Location:
    Los Angeles
    Check your user permissions and make sure anonymous users are allowed access to your humor content type.

    Under views, you can use a filter to filter which node type you want to display.
     
  6. DnA02

    DnA02 Hey, how YOU doin?! OT Supporter

    Joined:
    May 27, 2004
    Messages:
    1,914
    Likes Received:
    0
    i have enabled the following for anonymous users :

    access content
    create homor content
    access all views

    i still cant post as an anonymous user though. i also have edited the node.tpl.php and got rid of the $submitted section.
     
  7. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,914
    Likes Received:
    8
    Location:
    Los Angeles
    You should definitely modify a different theme than garland. Garland is an advanced theme and modifying things within it can get messy quick. The bluemarine theme is a simple base theme you can probably start from.

    If all your permissions are correct, try rebuilding your permissions at admin > content > post settings.
     
  8. DnA02

    DnA02 Hey, how YOU doin?! OT Supporter

    Joined:
    May 27, 2004
    Messages:
    1,914
    Likes Received:
    0
    i tripled check my permissions, rebuilt the permissions, and anonymous posting still isnt working for some reason.

    Just to clarify, i edited node.tpl.php that was in the bluemarine template section. This is the file i want to edit correct? or am i suppose to modify the node.tpl.php file thats in the modules>node section?

    Would you mind taking a look at my settings? i'll PM you the login info kingtoad if you have time/dont mind
     
  9. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,914
    Likes Received:
    8
    Location:
    Los Angeles
    Yes, that should be the correct file you needed to edit. If removing $submitted doesn't work, then you'll probably have to do the theme_username override in template.php.

    I'll take a look at your settings. Have you done any development on this that I need to see? Or is it all drupal config?
     
  10. DnA02

    DnA02 Hey, how YOU doin?! OT Supporter

    Joined:
    May 27, 2004
    Messages:
    1,914
    Likes Received:
    0
    i havent done anything besides drupal config and what you've told me as far as editing php files etc.
     
  11. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,914
    Likes Received:
    8
    Location:
    Los Angeles
    I started messing with my own Drupal installation. Pathauto doesn't allow the creation of aliases as unix formatted timestamps. You can always use node-id, however. On an additional note, you are probably better off using CCK and creating a custom node type with custom fields. This is the easiest way.

    The more difficult way would be to write preprocessor functions to process the data before it's output in Drupal. I don't think you want to go this route though. :hsd:

    The other thing you can do, and I do not recommend this, is calling out the titles as the timestamps in your node.tpl.php file and page.tpl.php file. In node.tpl.php, the correct variable to output the unix timestamp is $created. In page.tpl.php, you can access the node creation date by outputting $node->created.

    Also, Pathauto doesn't support the use of unix timestamps as url aliases. You can however use something different, such as the node id, or create your own custom node type using custom fields in CCK, and you'll be able to get Pathauto to do it using the [title-raw] attributes.

    One more thing, went modifying a core Drupal theme it's wise to copy and place it in /sites/all/themes/name of theme, and editing that theme from there. Sometimes core Drupal themes are constructed specially to handle installations and upgrades. Don't want to mess with that too much.

    CCK is really messy. Be careful with it.
     
  12. DnA02

    DnA02 Hey, how YOU doin?! OT Supporter

    Joined:
    May 27, 2004
    Messages:
    1,914
    Likes Received:
    0
    alrighty thanks. i will try some more
     
  13. Mikenotmike

    Mikenotmike

    Joined:
    Jun 1, 2001
    Messages:
    6,244
    Likes Received:
    0
    Location:
    USA
    Weird.. do you have any non-core modules installed? If you switch to a different theme does the problem stick?

    I tried posting and got the same results you did as anon
     
  14. Mikenotmike

    Mikenotmike

    Joined:
    Jun 1, 2001
    Messages:
    6,244
    Likes Received:
    0
    Location:
    USA
    to answer my own question, you mentioned views already, what else do you have installed, cck?

    Have you tried turning them all off temporarily?
     
  15. DnA02

    DnA02 Hey, how YOU doin?! OT Supporter

    Joined:
    May 27, 2004
    Messages:
    1,914
    Likes Received:
    0
    i'm running drupal 6.9 and i have pathauto installed (disabled when you tried posting) and views installed (enabled when you tried posting). i didnt do any file editing except for the node.tpl.php thats in the bluemarine template.

    the error is still there with the garland theme as well

    CCK isnt installed but i think ill just do a fresh install and try again, just in case i screwed up a setting or something
     
  16. Mikenotmike

    Mikenotmike

    Joined:
    Jun 1, 2001
    Messages:
    6,244
    Likes Received:
    0
    Location:
    USA
    Also don't forget to try and clear the cache, the option is under performance. Might help with your views problem.
     

Share This Page