Support Forums

Total Listings problem?? Weird one :P

This is a discussion on Total Listings problem?? Weird one :P within the Modules / Plugins / Modifications forums, part of the Developer Forums category; Okay, this has me stumped.... on my layout.tpl I use the command: {total_listings} to show the total listings of the ...


Go Back   68 Classifieds Forums > Developer Forums > Modules / Plugins / Modifications

Reply
 
Thread Tools Display Modes
Old 01-10-2008, 07:03 PM   #1
Senior Member
 
Join Date: Sep 2006
Posts: 236
Rep Power: 18
Tim_A is on a distinguished road
Default Total Listings problem?? Weird one :P

Okay, this has me stumped....

on my layout.tpl I use the command: {total_listings} to show the total listings of the site which works great

However... when I use an include for a calendar script:

{php}
$LIST=1;
$listWeeks = 52;
$listEvents = 3;
$noOld = 1;
$DF = "D - M d";
$template="monthly.php";
require ("calendar/calendar.php");
{/php}

the calendar shows up fine, but the listing number disappears!!!

If I use a regular include such as: {php} include "banners.php"; {/php} they both work fine!

any ideas about a possible conflict??

Cheers all
__________________
V4.0.9 Developer
Tim_A is offline   Reply With Quote
Old 01-10-2008, 09:49 PM   #2
Coder
 
Join Date: Mar 2006
Posts: 4,982
Rep Power: 121
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

There may be a variable conflict. Thats one problem about using code snippets, you have to make sure they dont use variables already in use.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 01-11-2008, 05:37 AM   #3
Senior Member
 
Join Date: Sep 2006
Posts: 236
Rep Power: 18
Tim_A is on a distinguished road
Default

that would make sense, no doubt there's a 'total listings' with the calendar include.

Is there an alternative way around this? Could I use a SQL query to bring in the total 68 listings? If so, could anyone tell me how please

Always grateful for any help

Tim
__________________
V4.0.9 Developer
Tim_A is offline   Reply With Quote
Old 01-11-2008, 12:01 PM   #4
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,316
Rep Power: 125
Eric Barnes is a jewel in the rough
Default

Tim,

Here is the post with the total listings function:
http://www.68classifieds.com/forums/...total_listings

You should be able to use it to get the query used.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 01-11-2008, 04:35 PM   #5
Senior Member
 
Join Date: Sep 2006
Posts: 236
Rep Power: 18
Tim_A is on a distinguished road
Default

I'm sorry for being a numpty... but how would i get it to display the total on the page without conflicting?

Thanks again
__________________
V4.0.9 Developer
Tim_A is offline   Reply With Quote
Old 01-11-2008, 05:49 PM   #6
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,316
Rep Power: 125
Eric Barnes is a jewel in the rough
Default

What I would recommend is opening the total listings function and changing this portion:
PHP Code:
$total_listings=$rs['total'];
return 
$total_listings

Maybe change it to:
PHP Code:
$my_total_listings=$rs['total'];
return 
$my_total_listings
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 01-11-2008, 08:28 PM   #7
Senior Member
 
Join Date: Sep 2006
Posts: 236
Rep Power: 18
Tim_A is on a distinguished road
Default



sadly just makes the page go blank when I call it????
__________________
V4.0.9 Developer
Tim_A is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with searching the Listings sporthorsebreeder v3.1 Questions & Support 5 11-16-2007 12:56 PM
How to display category total listings? dankellaway v3.1 Questions & Support 2 03-13-2007 02:25 PM
weird problem after receiving "hash error" dawyatt v3.1 Modules & Modifications 8 11-09-2006 03:46 PM


All times are GMT -4. The time now is 12:07 AM.


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