Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

New site - classifieds style

edited August 2007 in Vanilla 1.0 Help
Hi, just downloaded Vanilla and love it so far. I was recommended the software over on the Textpattern site, as I am looking to change a site I run towards a better CMS. My site offers job listings, in which members can see contact details for each job if they are logged in/current paid up members. I use aMember to manage the members. In addition, I have a classifieds section which allows users (anyone) to post a classified advertising themselves, their services or maybe their facility. Question is - which add-ons might be useful for me in the development of this site? I would like to test Vanilla to see if it is a viable solution for us. What we need: 1. Any user can post/edit/delete a classified ad 2. Users should be able to upload image/s to accompany their ads 3. Possibility of making upload of images a paid-for option 4. Users have their own page, for example a resume page, which they could link to for marketing purposes Hope these questions make sense, and since I have only just started with Vanilla, I don't know how much is possible. Thanks!
«1

Comments

  • I'd suggest you just do some digging round the addons site (you'll probably find tons on there that you want to install which most people will overlook as reasonably standard extensions), but as a guide I'd check out: Multi Roles / Category roles (read into these first I'm not sure theyre entirely flawless) Attachments 2 and Inline Images / Multi File Upload I think someone made an extension to do something close to #4...maybe called user profiles or some such? I guess you could mix it up with the predefined attributes extension and a couple of others to try and achieve what you want.
  • Anyone able to help??
  • Look into the user wall add-on as a guid on how to do #4, its very well implemented.
  • Thanks wallphone, I will take a look at that....I don't know what a user wall is (don't use facebook or myspace) but I will soon find out... Any ideas on whether there have been some good uses of Vanilla for the type of site I need to create? A jobs listings site with resumes and classifieds? Any help is appreciated..thanks.
  • For example, how would one change the default "discussions" tab, to something that would make more sense for us, like "job postings"?
  • From a recent discussion today, edit your conf/language.php file and add the following:
    $Context->Dictionary['Discussions'] = 'Job Postings';
    This will override the current definition.
  • Hi jstubbs,

    A couple of notes from the 'guilty culprit' from the txp forum ;-) I mentioned it because all your basic, write/edit/lock functionality for posting comes with vanilla, it has a good user management system which you can link to read/write permissions and can be heavily remodelled both in terms of structure (themes) and appearance (styles).

    You can change wording of most anything as jimw has mentioned. Just find the relevant text in language/definition.php (but don't change it there), then enter that definition with your own wording into conf/language.php (which overrides the standard language file and won't get deleted when you update the forum).

    Vanilla's theming setup allows you to change the look of individual elements entirely, so you could repurpose it well. Look through the themes and you'll see one set up as a ticket system (issue tracker), another one similar to a blog (beautiful lie). Both modify the appearance of the forum away from its typical structure. There are many css hooks in the layout so you can treat the initial post (= job/resume) differently to the comments. It does takes some work and fiddling with the CSS but it's possible. You'll probably find you spend more time simplifying the appearance.

    You could use categories to separate resumés from job postings. There are some add-ons for changing how posts are displayed, e.g. per category lists, so your front page could be a list of job posts followed by list of the most recent resumés (Discussion Overview).

    User-management/permissions: Vanilla has a quite granular system of user roles and permissions. Permissions are the allowance to do certain things in Vanilla, and you can define your own user roles with certain sets of permissions. You could therefore accord a (paying) subscriber, a job-poster role with image upload permissions and give other members different read/write permissions. You can do this for anonymous visitors too and you can also have different levels of moderators the same way (e.g. mods who can okay job postings but without access to the vanilla internal setup). You can limit certain roles to certain categories (e.g. write access for job posters and resumé posters) and there are some further add-ons that add certain permission/role/category combinations that aren't available out of the box.

    Images: minisweeper said it already: attachments and its associated add-ons allow users to upload images. Once you've got it set up it works great and you can either have them inline or as thickbox pop-ups including automated thumbnailing.

    For user profile pages, you could use the user wall as wallphone said, or use a combination of extended application form, predefined attributes and account pictures to extend the standard information and then remodel the profile part of the theme. For a more full-blown setup you might want to check out houseblogs.net who have added their own profile add-on.

    The search is also quite good and you can use saved searches to define links to produce only certain kinds of listings.
    rss is inclusive too (which I imagine you would want), with the help of add-ons also customisable... the list goes on.
  • edited July 2007
    Hi Jakob, Thanks for the very detailed help. It will take me some time to go through it, but having already started with some of your suggestions, I see more clearly how it all fits together... Some quick questions: 1. How to display the job posting title but not the full text of the posting? (It should be viewable only to a paid member) 2. At the moment, I list jobs according to country and State. Users can search by State, which makes it easy to find a job where they want. In Vanilla, is this possible? 3. Currently, we have job postings that expire according to the user's wishes 1-6 months. A cron job is used to delete an expired listing. Is there a way we could manage this in Vanilla? Edit: Added #3...
  • 1. This translates into readable "discussion overview" but job listing (=discussion) only readable with the appropriate permissions. For this you'd need to change the comments.php theme file (which outputs the discussion) for showing the discussion post so that it checks the user's role (or alternatively a permission) first before outputting the discussion. It's just a matter of enclosing the section that outputs the post plus comments in the existing theme file in an appropriate if ... role/permission ... then ... go ahead ... else ... message statement.

    For roles this works roughly like this, where N = number of the role (you can look this up in your DB tables).
    if ($User->RoleID == N) { rest of comments.php } else { message }

    For permissions this works as follows:
    if ( $User->Permission('PERMISSION_YOUR_PERMISSION') ) { rest of comments.php } else { message }

    Using permissions allows for more granular support (e.g. is independent of role: you set that permission in the roles which should be allowed access) but where the permission is not already part of Vanilla, you will need to define the permission first in an add-on of your own. More on permissions here.
    More on making themes here.

    2. I've not tried it (yet) but I guess with the help of the Discussion Tags add-on, you could do that.

    3. Perhaps the Discussion expiration add-on would be of help here :-)
  • Hi Jakob,

    I really appreciate your help - you have made the project seem possible ;-)

    All of your suggestions have been helpful so far, but I don't see in the comments.php file where the permissions/roles if/else statement should go...

    I use the delbat theme and opened the comments.php file within that folder. So far I don't see where it could go, but I will take another look and see if I can figure it out.
  • jstubbs, I'm away for a week or so, so no time to try it out in detail. I'm not familiar with the delbat theme, but looking at the comments.php in that folder I would enclose the central section after <tbody> ('bout line 32 onwards) up to just before the closing </tbody> statement ('bout line 145 onwards) in the if statement. The if statement should be made to test if user is allowed to see the post, if not then show message and sign up, else show post and comments as normal. In words that looks a bit like this: if (user not of correct role / if user does not have permission, see above) { $CommentList .= '<tr><td><p>This job listing is only readable for paid members. <a href="become-member-link-here">Sign up to become a member</a>!</td></tr>'; } else { lines approx. 32 - 145 } That's the basic principle.
  • Hi,

    I entered the followed in the delbat comments.php them file:

    if ($User->RoleID == 4)
    {
    $CommentList .= '

    This job listing is only readable for paid members. Sign up to become a member!';
    }
    else
    {
    all lines between the opening and closing

    tags
    }

    And it does not work for me - I get these errors in the MAMP PHP error logs:

    [04-Aug-2007 13:40:26] PHP Notice: Undefined variable: User in /Applications/MAMP/htdocs/vanilla/themes/delbat/comments.php on line 33
    [04-Aug-2007 13:40:26] PHP Notice: Trying to get property of non-object in /Applications/MAMP/htdocs/vanilla/themes/delbat/comments.php on line 33
    [04-Aug-2007 13:40:27] PHP Notice: Undefined variable: User in /Applications/MAMP/htdocs/vanilla/themes/delbat/comments.php on line 33
    [04-Aug-2007 13:40:27] PHP Notice: Trying to get property of non-object in /Applications/MAMP/htdocs/vanilla/themes/delbat/comments.php on line 33
    [04-Aug-2007 13:41:16] PHP Parse error: syntax error, unexpected $end in /Applications/MAMP/htdocs/vanilla/themes/delbat/comments.php on line 170
    [04-Aug-2007 13:41:17] PHP Parse error: syntax error, unexpected $end in /Applications/MAMP/htdocs/vanilla/themes/delbat/comments.php on line 170
  • Also wondering if there is a way to show a "teaser" of each classified posting? Instead of just the title of the classified being displayed, I would like *some* of the text of the classified to be shown.

    Reason being - the title of a classified may not be enough for someone to sign up for the service - if a user sees part of the text it helps because then the user can decide if the classified is worth signing up for....

    Any ideas??
  • Jakob, hope you can help with this error I am getting, plus my last post about the teaser....think this is my last major hurdle before switching the site to Vanilla...
  • There is an add-on called DiscussionExcerpt that might help.
  • Thanks jimw, I will look at your add-on...think though that it will not do what I need, which is:

    Title of the post
    The first 100 or so characters of the post

    Click on the post link, and if the user is a paid member, display the entire post (classified). If not a current, paid member, then display a "subscribe now" message.

    Rationale is that potential subscribers can't tell from the title of the post alone whether or not the classified is interesting enough to sign up for.
  • Mmm, still have not figured this one out - how to get jakob_r's suggestion to work. http://lussumo.com/community/?CommentID=73013 (New site - classifieds style # 13)

    Anyone have an idea of where I could be going wrong? Not much good at PHP I'm afraid..
  • edited August 2007
    The first four of those errors mean a variable is misnamed... try this as your first line of code: if ($Context->Session->User->RoleID == 4)
    The other messages usually mean a quote mark, brace, or PHP code bracket (<?php ... ?>) is misplaced somewhere.
  • edited August 2007
    Thanks WallPhone for the help!

    I now have this in the comments.php file:

    if ($Context->Session->User->RoleID == 4)
    {
    $CommentList .= '
    This job listing is only readable for paid members. Sign up to become a member!';
    }
    else
    {
    all lines between the opening and closing "tbody" tags
    }

    Now, I only get these PHP errors:

    [31-Aug-2007 16:48:15] PHP Parse error: syntax error, unexpected $end in /Applications/MAMP/htdocs/vanilla/themes/delbat/comments.php on line 170
    [31-Aug-2007 16:48:15] PHP Parse error: syntax error, unexpected $end in /Applications/MAMP/htdocs/vanilla/themes/delbat/comments.php on line 170

    I would imagine that the error must be with the above posted opening/closing PHP tags, since the default Vanilla lines is placed after the "else" statement. Trouble is, I can't see what's wrong....can you??
This discussion has been closed.