Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Classifieds v1.2
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 7

AWD_ENVY
Junior Member

103 Posts

Posted - 19 September 2003 :  00:33:18  Show Profile
Anyone ?
Go to Top of Page

UGBC
Junior Member

143 Posts

Posted - 19 September 2003 :  02:37:53  Show Profile
My coding skills aren't exactly up to par, but my best guess for this would be to do a
SELECT *
WHERE Day(Date() - DATE_POSTED) <= EXPIRATION_LENGTH (or whatever you called that particular column)

Now I'm sure there would be all kinds of syntax errors here but that's the logic that makes sense to me, by the way just curious to add the sub categories did you make a new table in the database?

I'm going to be doing something similar so that my users can sell their books and have it sorted by department.

Cheers, Matt
Go to Top of Page

UGBC
Junior Member

143 Posts

Posted - 19 September 2003 :  02:39:41  Show Profile
I'm also wondering if anyone has made an efficient way for a user to set the status of their ad to "sold" rather than just having them manually delete the ad.
Go to Top of Page

jeepgen
New Member

Italy
73 Posts

Posted - 14 December 2003 :  09:41:00  Show Profile  Visit jeepgen's Homepage  Send jeepgen a Yahoo! Message
anyone knows why my classified in MS SQL shows only ads title and not email and so on??
Any help will be of help, thanks

Go to Top of Page

acoustika
Junior Member

Denmark
311 Posts

Posted - 15 December 2003 :  15:43:56  Show Profile  Visit acoustika's Homepage  Send acoustika an ICQ Message
I found out that in the page with the 15 most recent ads, it would show an add that was edited by the user as the most recent, not a bug but was it supposed to be like this???

May The Code Be With You
www.UniqueDk.dk *** The Open Forums of Denmark ***
Go to Top of Page

Kent
Junior Member

United States
193 Posts

Posted - 15 December 2003 :  17:05:55  Show Profile
quote:
Originally posted by acoustika

I found out that in the page with the 15 most recent ads, it would show an add that was edited by the user as the most recent, not a bug but was it supposed to be like this???



It has always functioned this way, since it stores the date updated in only one data field (no separate fields for when initially posted vs edited).
Go to Top of Page

acoustika
Junior Member

Denmark
311 Posts

Posted - 15 December 2003 :  19:29:49  Show Profile  Visit acoustika's Homepage  Send acoustika an ICQ Message
okay, but isn't there an add ID that could be sorted by instead, so it just showed to highest ID, that would do it. But don't know if there is such a field in the DB, I'll check sometime ;-)

May The Code Be With You
www.UniqueDk.dk *** The Open Forums of Denmark ***
Go to Top of Page

Kent
Junior Member

United States
193 Posts

Posted - 16 December 2003 :  13:39:22  Show Profile
quote:
Originally posted by acoustika

okay, but isn't there an add ID that could be sorted by instead, so it just showed to highest ID, that would do it. But don't know if there is such a field in the DB, I'll check sometime ;-)



There's actually a "benefit" of it working the way it does. People can "renew" their add simply by editing it, to prevent it from being automatically deleted after the 30, 60 or whatever number of days...
Go to Top of Page

acoustika
Junior Member

Denmark
311 Posts

Posted - 16 December 2003 :  18:12:31  Show Profile  Visit acoustika's Homepage  Send acoustika an ICQ Message
yeah that's right, but the could do it by making a new one to, this way it could be a contest to get in daily to hit the edit button to get you add showed on top. But hey, it's a minor thing ;-)

May The Code Be With You
www.UniqueDk.dk *** The Open Forums of Denmark ***
Go to Top of Page

taropatch
Average Member

USA
741 Posts

Posted - 30 December 2003 :  00:35:51  Show Profile
How can I add a confirm delete to prevent the Admin (me) from accidentally wiping out categories? Seems easy to do since the edit icon is right next to the delete.
Go to Top of Page

stwilson
Junior Member

USA
385 Posts

Posted - 28 February 2004 :  14:39:17  Show Profile  Visit stwilson's Homepage
Can you tell me if there is an option to setup the ads as moderated? My classifieds are fee based, so I do not want ads to show until they have been paid for. Additionally, I really like the suggestion to allow the user to mark the ad as sold. That would be a nice addition.

Shannon
RidingArizona.com
Go to Top of Page

edmartin
Starting Member

46 Posts

Posted - 03 April 2004 :  00:36:36  Show Profile
quote:
Originally posted by Ryan

Like I said in the readme I didnt add a link in the inc_header.asp file. I simply created a weblink (go to your main forum page and on the category bar find this: ). The link to your classifieds will be: http://[your_site].com/classifieds.asp.
quote:
Can the code you show in the readme file go anywhere around line 489? Or is there a specific point it should be copied after?
Its easier to just create a weblink. I say that because it is more visable as part of the forum then a link at the top which might be missed by visitors. Go to my site and see how I made the weblink.



Is there any way to get a web link to launch in the same window like a normal forum category does? Having the classifieds launch in a separate window is a little... different.
Go to Top of Page

Ryan
Average Member

USA
858 Posts

Posted - 03 April 2004 :  16:55:44  Show Profile  Visit Ryan's Homepage
You would have to modify the code, I believe, as the weblinks are set up to open in new windows. There may be an option but I dont think so.

The Poultry Link - "Serving the best of the fancy with the best of the web"
Forum Setup Help
Go to Top of Page

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 04 April 2004 :  08:07:01  Show Profile
Code changes to reduced loading time and database calls.
Tested on SQL Server

classifieds.asp

This removes 30 database calls!

Replace all instances of
getNewMemberNumber()
with
MemberID


This removes 15 database calls!

Replace
'get the ads for this category
strSql = "Select ID, Topic_ID, ad_title, price, image_url, name, added_By, address, city, zip, state, email, date_posted, content, "
strSql = strSql & "link FROM " & strTablePrefix &  "ADS_CONTENT ORDER BY date_posted desc limit 15"
Set rsAds = my_Conn.Execute(strSql)
with
'get the ads for this category
strSql = "SELECT TOP 15 m.M_NAME, ad.ID, ad.TOPIC_ID, ad.AD_TITLE, ad.PRICE, ad.IMAGE_URL, "
strSql = strSql & "ad.NAME, ad.ADDED_BY, ad.ADDRESS, ad.CITY, ad.ZIP, ad.STATE, ad.EMAIL, ad.DATE_POSTED, ad.CONTENT, "
strSql = strSql & "ad.LINK FROM " & strTablePrefix &  "ADS_CONTENT ad, " & strTablePrefix &  "MEMBERS m "
strSql = strSql & "WHERE ad.added_By = m.MEMBER_ID "
strSql = strSql & "ORDER BY ad.DATE_POSTED DESC"
Set rsAds = my_Conn.Execute(strSql)
replace the 1 instance of
getMemberName(rsAds("Added_By"))
with
rsAds("M_NAME")



You can also remove the following from classifieds.asp as it will no longer be required
<!--#INCLUDE FILE="inc_func_class.asp" -->


I also remove the 2 instances of
<i>(<%= adCount(rsClassifieds("ID"))%>)</i>
as it is very slow if you have alot of adverts. This is the code to display the amount of adverts in each category.

All the above changes reduced my page loading time from 100 seconds to less than 1 second!

The UK MkIVs Forum

Edited by - DavidRhodes on 04 April 2004 08:44:05
Go to Top of Page

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 04 April 2004 :  08:42:22  Show Profile
classViewAds.asp

Removes 1 database call per advert

Replace
gsSQL = "Select ID, Topic_ID, ad_title, price, image_url, added_By, address, city, zip, state, email, date_posted, "
gsSQL = gsSQL & "link, content FROM " & strTablePrefix & "ADS_CONTENT WHERE Topic_ID = " & catID & " ORDER BY date_posted DESC"
Set rs = my_Conn.Execute(gsSQL)
with
gsSQL = "SELECT m.M_NAME, ad.ID, ad.TOPIC_ID, ad.AD_TITLE, ad.PRICE, ad.IMAGE_URL, "
gsSQL = gsSQL & "ad.NAME, ad.ADDED_BY, ad.ADDRESS, ad.CITY, ad.ZIP, ad.STATE, ad.EMAIL, ad.DATE_POSTED, ad.CONTENT, "
gsSQL = gsSQL & "ad.LINK FROM " & strTablePrefix &  "ADS_CONTENT ad, " & strTablePrefix &  "MEMBERS m "
gsSQL = gsSQL & "WHERE ad.added_By = m.MEMBER_ID AND ad.TOPIC_ID = " & catID & " "
gsSQL = gsSQL & "ORDER BY ad.DATE_POSTED DESC"
Set rs = my_Conn.Execute(gsSQL)


Removes 2 database calls per advert

Replace all instances of
getNewMemberNumber()
with
MemberID



Again, you can also remove
<!--#INCLUDE FILE="inc_func_class.asp" -->

The UK MkIVs Forum

Edited by - DavidRhodes on 04 April 2004 08:47:01
Go to Top of Page
Page: of 7 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.13 seconds. Powered By: Snitz Forums 2000 Version 3.4.07