Support Forums

Old 04-30-2007, 07:51 PM   #1
Senior Member
 
alisa's Avatar
 
Join Date: Mar 2007
Posts: 126
Rep Power: 11
alisa is on a distinguished road
Default Event Listings

In searching through this forum...noticed the need for an event listing...
simple
Date
Title
Description
Contact
Website...

Did anyone come up with this yet?

I wanted it to be automated like the rest of the listings...
user uploads his info...
I can manually change expiry date if I have to...

Alisa
alisa is offline   Reply With Quote
Old 05-01-2007, 09:45 AM   #2
Senior Member
 
midi510's Avatar
 
Join Date: Mar 2007
Location: Mammoth Lakes, Ca
Posts: 135
Rep Power: 12
midi510 is a jewel in the rough
Default

Something like this? http://www.mammothgoods.com/viewlisting.php?view=53

I'm not done with this template. I'm going to put something like tickets/fee, parking fee, hours, I'm not sure yet. The date is actually three drop down fields (all numbers) then month is replaced by the word. I'm wanting to sort a custom showlisting by the event date. I want Community Events to appear on my home page. This would probably be easier if I was a programmer, but I'm making progress. This http://www.mammothgoods.com/comcal.php is the custom showlisting page, which shows all listings right now. I have very little time to work on this stuff.

Search forums for custom templates.
__________________
Kirk
V3.1.7 Developer
May you & your loved ones be blessed with
Grace, Peace, Forgiveness, Love, Wisdom, & Joy

Last edited by midi510; 05-01-2007 at 09:54 AM.
midi510 is offline   Reply With Quote
Old 05-01-2007, 10:18 AM   #3
Senior Member
 
alisa's Avatar
 
Join Date: Mar 2007
Posts: 126
Rep Power: 11
alisa is on a distinguished road
Default

Hi...thanks for the response...

Yes something like what you have there...
noticed you have different listing categories...such as extra fields for the calendar than the real estate...

it is exactly what I am trying to do...

if you could share how you get the listings to look different with each category I'd appreciate it...
I have a real estate section... and an event section....


I also have a regular front page (not yet live)..../index3.html which links into the classified area...
I am blending reg. html pages along with the classifieds...

Alisa

Last edited by alisa; 05-18-2007 at 01:00 PM.
alisa is offline   Reply With Quote
Old 05-01-2007, 10:58 PM   #4
Senior Member
 
midi510's Avatar
 
Join Date: Mar 2007
Location: Mammoth Lakes, Ca
Posts: 135
Rep Power: 12
midi510 is a jewel in the rough
Default

Alisa,
How's CT? I lived in Middletown and Middlefield in late eighties and early nineties. The info you need is in the forums, but spread around a bit, so I'll try to sum it up here.
1) Create all the categories and extra fields that you'll be using. You can add more later, but it's best to get 'em all in there now.
2) Open viewlisting.tpl.php or viewlisting2.tpl.php depending which format you've chosen in admin. Save it under a new name for as many custom templates as you want. Using html and smarty tags, customize the templates to your liking. For each of your extra fields use one {$extra.0.title} and one {$extra.0.value}. For now use 0 for the first one, 2 for the second, 4 for the third and so on. You can do what you want with the titles and values like for a city title try putting the city and state values together separated by a comma and space.
3) Open viewlisting.php and find
PHP Code:
$class_tpl->assign('listingsection'$rs['section']); 
I have it on line 76.
4) Ad
PHP Code:
$section=$rs['section']; 
below it.
5) Find
PHP Code:
  if($lDisplay==1)
  {
   
$class_tpl->assign('body','viewlisting.tpl.php');
  }
  else
  {
   
$class_tpl->assign('body','viewlisting2.tpl.php');
  } 
I have it at line 162 of the original 3.1.7 file.
6) Replace the above code with
PHP Code:
if($lDisplay==1)
{
    switch (
$section)
    {
             case 
1:
              
$class_tpl->assign('body','custom1.tpl.php');
         break;
        case 
2:
              
$class_tpl->assign('body','custom2.tpl.php');
         break;
        case 
3:
              
$class_tpl->assign('body','custom3.tpl.php');
         break;
         default:
              
$class_tpl->assign('body','viewlisting2.tpl.php');
         break;
 }
}
else
{
 
$class_tpl->assign('body','viewlisting2.tpl.php');

If you use format 2 I'd put ($lDisplay==2) in the if statement and viewlisting.tpl.php in the else statement. You really don't need the else statement knowing which templates your using, but I kept it anyway. Where I used case 1,2,3 use the category id. If you click on a category or sub category link in your browser a top level category will show up (the URL) as type=xx and subs will show up as sec=xx after that. If you have a lot of categories, I'd go into the database and print a list of cats with ids.
7) Place {debug} in layout.tpl.php. I put it between the head and body. save and upload files.
8)Place an ad in each category that uses a custom template. All extra fields must have some content. Drop downs should include NA or None or something like that and you should put a default in text fields. The ad won't display properly if you have an empty extra field.
9) View the ads and see where things come out. The smarty console will give you an array of extra field info:
Array (8)
0 => Array (3)
fID => 20
title => Company
value => Hoohaa Computer Services
2 => Array (3)
fID => 22
title => Location
value => Mammoth Lakes
4 => Array (3)
fID => 11
title => Shift
value => 7:30am - 4:30pm
6 => Array (3)
fID => 8
title => Wage/Salary
value => $100,000 per year
8 => Array (3)
fID => 21
title => Starting Date
value => July 1, 2007
10 => Array (3)
fID => 23
title => Apply By
value => May 31, 2007
12 => Array (3)
fID => 12
title => Requirements
value => This is a test ad. This is a test ad....
14 => Array (3)
fID => 56
title => State
value => CA
Use this to update your titles and values mentioned in step 2.
If I've forgotten or messed something up I'm sure someone will catch it.
__________________
Kirk
V3.1.7 Developer
May you & your loved ones be blessed with
Grace, Peace, Forgiveness, Love, Wisdom, & Joy
midi510 is offline   Reply With Quote
Old 05-01-2007, 11:56 PM   #5
Senior Member
 
midi510's Avatar
 
Join Date: Mar 2007
Location: Mammoth Lakes, Ca
Posts: 135
Rep Power: 12
midi510 is a jewel in the rough
Default

For you module developers, a community calender mod would be nice.
__________________
Kirk
V3.1.7 Developer
May you & your loved ones be blessed with
Grace, Peace, Forgiveness, Love, Wisdom, & Joy
midi510 is offline   Reply With Quote
Old 12-09-2008, 01:22 PM   #6
Member
 
Join Date: Nov 2008
Posts: 64
Rep Power: 3
DGiscombe is on a distinguished road
Default

Would this work with v4 as well?
DGiscombe is offline   Reply With Quote
Old 12-09-2008, 08:29 PM   #7
Senior Member
 
midi510's Avatar
 
Join Date: Mar 2007
Location: Mammoth Lakes, Ca
Posts: 135
Rep Power: 12
midi510 is a jewel in the rough
Default

I'm really not familiar with v4.
__________________
Kirk
V3.1.7 Developer
May you & your loved ones be blessed with
Grace, Peace, Forgiveness, Love, Wisdom, & Joy
midi510 is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to display category total listings? dankellaway v3.1 Questions & Support 2 03-13-2007 01:25 PM
Special Character in Listings stops feed! garysr v3.1 Questions & Support 6 01-09-2007 10:29 PM
Removing number of listings in home.tpl.php SkGold v3.1 Modules & Modifications 8 12-20-2006 10:04 PM
Top Listings sbuell20 v3.1 Questions & Support 0 09-02-2006 12:11 PM
Difference between top listings and new listings pat01 v3.1 Questions & Support 6 07-18-2006 03:31 AM


All times are GMT -4. The time now is 04:09 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0