CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!
Free 3 Months



Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.classifieds_starter_kit Tags:
Item Type: NewsGroup Date Entered: 6/22/2006 3:30:06 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 42 Views: 36 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
43 Items, 3 Pages 1 2 3 |< << Go >> >|
jherch77
Asp.Net User
Only one featured add?6/22/2006 3:30:06 PM

0/0

Hi,
Only one featured add is showing up on the main page even though I have 3 selected. I am still new to this and can't figure out how to change it so it displays all three.

Can anyone help?

Thanks
jherch77
Asp.Net User
Re: Only one featured add?6/23/2006 6:11:22 PM

0/0

Well, I figured out what seems to be the easiest solution to this...albeit not the best.  I changed the following function to what is below:


        Public Shared Function GetFeaturedAd() As DataTable
            Dim table As AdsDataComponent.AdsDataTable = AdsDB.GetFeaturedAdsSelection(3)
            Return table
        End Function


And in the control FeaturedAd.ascx I changed everything that said AdID with Id.

That made my 3 ads show up.
marcgel
Asp.Net User
Re: Only one featured add?6/28/2006 10:18:55 PM

0/0

The kit was designed to pick one of 1 or more cached feature ads and show that. Your approach for showing a specified number of ads will work. If I were going to add the feature I would consider using the the generic List<> and duplicating the structure of the existing methods to get the benefits of caching:

public static List<CachedFeaturedAd> GetFeaturedAdList(int displayCount)
{
  
return GetFeaturedAdList(HttpContext.Current, displayCount);
}

public static List<CachedFeaturedAd> GetFeatureAdList(HttpContext context, int displayCount)
{
// check if feature is in cache
// if not add to cache
}

DisplayCount could be passed in <asp:Parameter> from FeatureAd.ascx ObjectDataSource. Otherwise FeatureAd.asc would stay the same.


[This posting is provided "AS IS" with no warranties, and confers no rights.]
yhhaw
Asp.Net User
Re: Only one featured add?7/20/2006 8:12:55 AM

0/0

Hello,

May I know where can I activate the featuredAd?  Anybody .... Please help.

Regards,

justin0501
Asp.Net User
Re: Only one featured add?7/20/2006 12:12:08 PM

0/0

It's already built in. There are 3 AdLevels if I remember right off hand.

Uspecified = 0
Normal = 10
Featured = 50

So if you save an ad with AdLevel 50 it will be a featured item

yhhaw
Asp.Net User
Re: Only one featured add?7/20/2006 1:21:31 PM

0/0

Do you mean the person who post until 50 items then only can be shown on the home (or default) page?  Don't quite understand .... correct me if i am wrong.  Can anybody tell me more about this?  I thought only administrator got the authority to decide who/what to be appeared on the main page ....

So ..... if that is the case, how can I customise it?  What if I (as an adminitrator) want a specific Ad (with photo) to be appeared at the home page?  Please help.

justin0501
Asp.Net User
Re: Only one featured add?7/20/2006 1:57:26 PM

0/0

That's not what I mean. Those values are saved to the database. So if an ad has a level of 50 it is considered a Featured Ad.

You, as the adminstrator can decide which ads are to be featured or not. So if you login as administrator and manage your ads, there is an option to set the selected ads as featured

yhhaw
Asp.Net User
Re: Only one featured add?7/20/2006 2:37:16 PM

0/0

I think you are refering to "Manage Ads & features" under Site Administration.

I tried to play with all kind of selection, click the "query" button, but it doesn't work, it showed "An error occurred. Please contact the site administrator", may I know what could go wrong?

justin0501
Asp.Net User
Re: Only one featured add?7/20/2006 3:16:17 PM

0/0

It's kind of hard to tell what your exact error is. But if I remember correct there is an error with a declaration of a variable.

There was a previous post about this:

The error is on line 167 in the 'Admin/Ads.aspx' file. maxPrice is defined as Type 'int32'. Change it to 'Decimal'.

You should turn off Custom Errors in your web.config until you upload it to production so you can see the exact error messages instead of that custom error page

yhhaw
Asp.Net User
Re: Only one featured add?7/20/2006 3:53:15 PM

0/0

I've got it.  Thank you very much!
paggy4u
Asp.Net User
Re: Only one featured add?9/13/2006 5:49:24 AM

0/0

jherch77:
Well, I figured out what seems to be the easiest solution to this...albeit not the best.  I changed the following function to what is below:


        Public Shared Function GetFeaturedAd() As DataTable
            Dim table As AdsDataComponent.AdsDataTable = AdsDB.GetFeaturedAdsSelection(3)
            Return table
        End Function


And in the control FeaturedAd.ascx I changed everything that said AdID with Id.

That made my 3 ads show up.

---------------------------------------------------------------------------------------------------------

Hello Can any one come ahead with an exact solution to make this work.

I do not understand how to make this work as  per the code mentioned above. Does it really work or thiere is a bug within.

Since this was before the Final Kit, i believe, there should be an exact solution by now.

Help us out.

Thanks


Paggy4u
-----------------------------------------
An Unblinking eye on IronRuby,Asp.Net and .Net
http://ironruby.blogspot.com/
tonsai
Asp.Net User
Re: Only one featured add?9/13/2006 10:12:03 AM

0/0

One other thing to note is that an entry will only display/work if the advert has a photo.
Custom Classifieds Site: http://tinyurl.com/3ybh5k
paggy4u
Asp.Net User
Re: Only one featured add?3/14/2007 7:46:14 AM

0/0

Any working solution with a VB code.

I still cannot show 3 featured ads on the front page.

I would appreciate, if some one can help[ me out with a working solution with cache in VB.NET.

Thanks

Paggy4u
-----------------------------------------
An Unblinking eye on IronRuby,Asp.Net and .Net
http://ironruby.blogspot.com/
rfurdzik
Asp.Net User
Re: Only one featured add?7/18/2007 7:18:18 AM

0/0

 

What changes are required to CSS to show 3 ads horizontally. I have added

#featured_item

{

float: left;

...

 }

But that makes next section to follow the featured ads... 


Rafal
Zikbay.com - The Best Free Online Classifieds


DNN Direct
domukajoor
Asp.Net User
Re: Only one featured add?7/24/2007 11:41:05 PM

0/0

Where is located that function you are talking about?

thanks 

r1kob
Asp.Net User
Re: Only one featured add?7/27/2007 2:29:20 PM

0/0

Public Shared Function GetFeaturedAd() As DataTable Dim table As AdsDataComponent.AdsDataTable = AdsDB.GetFeaturedAdsSelection(3) Return table End Function i would like to know exactly where to put this in the file, ine the vb file or the aspx file, and where, thank you for your advice and help

r1kob
Asp.Net User
Re: Only one featured add?7/27/2007 2:31:07 PM

0/0

Public Shared Function GetFeaturedAd() As DataTable Dim table As AdsDataComponent.AdsDataTable = AdsDB.GetFeaturedAdsSelection(3) Return table End Function i would like to know exactly where to put this in the file, ine the vb file or the aspx file, and where, thank you for your advice and help

prk72
Asp.Net User
Re: Only one featured add?7/30/2007 8:09:21 PM

0/0

jherch77:
Well, I figured out what seems to be the easiest solution to this...albeit not the best.  I changed the following function to what is below:


        Public Shared Function GetFeaturedAd() As DataTable
            Dim table As AdsDataComponent.AdsDataTable = AdsDB.GetFeaturedAdsSelection(3)
            Return table
        End Function


And in the control FeaturedAd.ascx I changed everything that said AdID with Id.

That made my 3 ads show up.
 

In which file can I find this function?  Thanks.

rfurdzik
Asp.Net User
Re: Only one featured add?7/31/2007 2:27:23 AM

0/0

 

This solution is not the best, yet it works. It would be nice if somebody would show the complete cached code....

 Here is the quick and dirty solution for now. This is in Ads.cs (appdata folder)

 

public static AdsDataComponent.AdsDataTable GetFeaturedAdsSelection(int maxNumAds)

{

if (maxNumAds < 1)

return null;

using (AdsDataAdapter db = new AdsDataAdapter())

{

return db.GetAdsByRandomOrder(maxNumAds, (int)AdStatus.Activated, (int)AdLevel.Featured);

}

}

 here is your featured.ascx page:

<asp:ObjectDataSource ID="FeaturedAdDataSource" runat="server" TypeName="AspNet.StarterKits.Classifieds.BusinessLogicLayer.AdsDB"

SelectMethod="GetFeaturedAdsSelection" OnSelected="FeaturedAdDataSource_Selected">

<SelectParameters>

<asp:Parameter Type="Int32" Name="maxNumAds" DefaultValue="3" />

 

</SelectParameters>


Rafal
Zikbay.com - The Best Free Online Classifieds


DNN Direct
rfurdzik
Asp.Net User
Re: Only one featured add?7/31/2007 2:30:40 AM

0/0

The problem with thsi solution is that you are bypassing cache code, so please somebody provide the complete C# cache code for us:)

 Otherwise i am going to write it :) Hope somebody will save my time :)


Rafal
Zikbay.com - The Best Free Online Classifieds


DNN Direct
43 Items, 3 Pages 1 2 3 |< << Go >> >|


Free Download:

Books:
Upgrading and Repairing PCs Authors: Scott Mueller, Pages: 1608, Published: 2003
Make Your Own Living Trust Authors: Denis Clifford, Pages: 349, Published: 2007
Mac OS X: The Missing Manual, Panther Edition: The Missing Manual Authors: David Pogue, Pages: 776, Published: 2003
Driven to Distraction: Recognizing and Coping with Attention Deficit Disorder from Childhood Through Adulthood Authors: Edward M. Hallowell, John J. Ratey, Pages: 319, Published: 1995
Learning Python Authors: Mark Lutz, Pages: 700, Published: 2007
How to Prepare for the SAT Authors: Sharon Weiner Green, Ira K. Wolf, Ph.D., Ira K. Wolf, Pages: 851, Published: 2006
Schaum's Outline of Theory and Problems of Linear Algebra Authors: Seymour Lipschutz, Marc Lipson, Pages: 424, Published: 2000
Living Together: A Legal Guide for Unmarried Couples Authors: Ralph Warner, Toni Lynne Ihara, Frederick Hertz, Pages: 278, Published: 2008

Web:
Only one featured add? - ASP.NET Forums Only one featured add is showing up on the main page even though I have 3 selected. I am still new to this and can't figure out how to ...
Only one featured add? - ASP.NET Forums Only one featured add? Last post 01-10-2008 1:17 PM by aleromer. 42 replies. Sort Posts:. Oldest to newest, Newest to oldest ...
Firefox 3.0: A look at features, add-ons, and record-setting Read original item: Firefox 3.0: A look at features, add-ons, ... Why are you the only one to have this problem?jdclyde | 06/19/2008 @ 06:31 AM (PDT) ...
Happy Ending Husband: "I'm Not The Only One" - Featured on BuzzFeed Happy Ending Husband: "I'm Not The Only One": Happy Ending Husband: "I'm Not The Only ... Thanks for participating. View Your Response or Add Another? ...
If you could add one feature to Tumblr, what would... | David's Log Oct 27, 2008 ... If you could add one feature to Tumblr, what would it be? ..... feature is uber cool. and it’d be awesome if it’s Tumblr only for the sake ...
One ADD Place A virtual neighborhood consolidating in ONE PLACE information and resources relating to Attention Deficit Disorder (A.D.D.), Attention Deficit Hyperactivity ...
RIAA's Statistics Don't Add Up to Piracy Carpenter was the only one who noticed this discrepancy, and I thank him for .... I wrote an article called "RIAA Statistics Don't Add Up to Piracy. ...
Blogger in Draft: New feature: Scheduled Posts I have only one thing to say to the Blogger Team: YOU ROCK! .... Hope you fix the bug soon and thanks a lot for adding this feature which i was waiting for ...
GameSpot Forums - Dynasty Warriors: Gundam 2 - If you could add ... If I wanted them to add one feature, it would be story stability. ... This would be the only thing I truly wish to add... if the new Original Mode isn't ...
WWW FAQs: How do I add a link to print only one part of a web page? 2007-03-30 : "I want to print only one image, or one div, from a web page— not .... unless the "print one image" feature is not a crucial part of your site. ...

Videos:
panacea81 (Lauren Luke) feature on Inside Out - BBC One http://www.bbc.co.uk/insideout Lauren Luke posts hugely successful video tutorials on applying make up on YouTube. She is virtually untrained and no...
Retrosound Model One feature video This video is an overview of features for our revolutionary Model One radio for classic and import cars.
Adding an Apple-style reflection to your images with The Gimp (video tutorial) Apple´s new iWeb software makes it easy for everyone to make their own web-pages. One feature in the iWeb software is the ability to create rather ne...
Björk ft. Thom Yorke - I've Seen It All The audio track is from Selmasongs (Dancer In The Dark OST), different from the one featured in the movie itself. It's not in sync, because resyncing...
Evanescence - My Immortal The song was written by Evanescence's former guitarist, Ben Moody, with Amy Lee adding the bridge. Like all songs written by Moody, the lyrics are ba...
Nine Inch Nails' Ghosts Film Festival - Introduction To expand the idea of the "Ghosts" project, we're inviting anyone and everyone to create visuals to accompany the album's music. In a few months, we...
Gandhi.avi Director:Richard Attenborough Writer:John Briley Release Date:8 December 1982 (USA) more Genre:Biography / Drama more Tagline:His Triumph Change...
Midify Feature Demo Midify is a tiny board that lets you add a MIDI port to just about anything. This is a demo of some of the features Midify offers. I've hooked LEDs...
VIOLENT FEMMES-Add it Up The Violent Femmes were the final band to ever play at Auckland's His Majestys Theatre before its controversial 1988 demolition. Gordon Gano played ...
Maclaren Techno XLR Travel System Product Features Kiddicare The XLR takes all the good things about the XT and adds a more luxurious cosseting environment, lined hood, reversible seat liner, soft head hugger a...




Search This Site:










csk and community server integration

how to add another searchtextbox ?

the files '/app_code/bll/locations.cs' and '/app_code/bll/sitesettings.vb' use a different language,

how to insert another page content into classifieds pages

i'm completely new and i need help

change expiration time from days/weeks to hours

controls/featuredad.asdx

url re-writing

how to change ad duration from days to months

error -2147217900 - incorrect syntax near ','

converting to web app

web.config and aspnetdb

activation of inactive or expired ad as an administrator !

formatting repeater control

use mysql to host

photo doesn´t show on page

progress bar for upload page

error: cannot convert to type system.decimal

[:)]need an overview

where do i start?

search by all members with guests role

error trying to create a new user. "an error occurred. please contact the site administrator."

classifiedsview_ads - error?

application_start

expiration date doesn't change when reactivate ads in admin panel

database in classifieds

custom panel design in csk

how to count the number of new ads in the last 24 hours?

disable wizard "next" button until a valid category selection is made

super slow on dual xeon box

  Privacy | Contact Us
All Times Are GMT