Advertisement:

Author Topic: Most Viewed Ads  (Read 56622 times)

Jesse

  • Hero Member
  • *****
  • Posts: 631
  • Out of my mind, back in 5 minutes
Re: Most Viewed Ads
« Reply #15 on: February 08, 2012, 10:26:38 am »
Hi Freeadz: Looks great! I wasn't really sure how people would want to visually display the popular ads, so I just used the same format as "latest items". But I really like the simplicity of your list. Good job!


Everyone is certainly encouraged to do the layout however they'd like. My examples are crude and only meant to provide some ideas.  :) The plugin is simply a utility to provide easy-access to the data. The rest is up to the user.  ;)

freeeadz

  • Newbie
  • *
  • Posts: 42
  • E-Adz
Re: Most Viewed Ads
« Reply #16 on: February 08, 2012, 12:05:54 pm »
Thanks Jesse for your appreciation for my first ever code (Updation) on the OSClass Forum

Pls I need help on this also.

http://forums.osclass.org/themes/some-changes-in-bcute-theme/

przemo

  • Jr. Member
  • **
  • Posts: 81
  • Director ;)
Re: Most Viewed Ads
« Reply #17 on: February 08, 2012, 01:02:43 pm »
Welcome!
The Annex gives main.php my code from the template of "modern". Please insert this plugin to me: (. I installed it already in the admin panel. My site: www.jasielskie.org.pl (please insert where it is written in Polish, "the most popular ads."

welshboy84

  • Newbie
  • *
  • Posts: 9
Re: Most Viewed Ads
« Reply #18 on: February 17, 2012, 04:28:54 am »
Where do I add the code to add this into my side bar please? I'm also using the Bcute template

Jesse

  • Hero Member
  • *****
  • Posts: 631
  • Out of my mind, back in 5 minutes
Re: Most Viewed Ads
« Reply #19 on: February 17, 2012, 05:03:50 am »
welshboy84,

Where you add the code completely depends on where you want this feature to appear. Do you want it to be displayed like the current "Latest Ads" are displayed? Or do you just want a list of "most viewed ads" in the sidebar? The answer to those questions will tell you exactly where to place the code. And exactly what code you'll need to use will again depend on how you want this to be displayed.

EDIT: I just re-read and noticed you said you wanted to place the code in your sidebar.... so not sure what else you're wanting to know? Obviously, if you want the code in the sidebar, then for goodness sake, place the code in the sidebar (somewhere under the code:  <div id="sidebar"> ).
« Last Edit: February 17, 2012, 05:07:32 am by Jesse »

chofi

  • Full Member
  • ***
  • Posts: 211
Re: Most Viewed Ads
« Reply #20 on: February 17, 2012, 05:51:58 am »
Hey Jesse

The plugin work well , and is very useful

thanks
Regards

Chofi

przemo

  • Jr. Member
  • **
  • Posts: 81
  • Director ;)
Re: Most Viewed Ads
« Reply #21 on: February 17, 2012, 06:24:42 pm »
PLZ help me UP

Jesse

  • Hero Member
  • *****
  • Posts: 631
  • Out of my mind, back in 5 minutes
Re: Most Viewed Ads
« Reply #22 on: February 18, 2012, 01:36:04 am »
przemo,

For starters, copy and paste my "Basic" example from my post here, http://forums.osclass.org/development/most-viewed-ads/msg21500/#msg21500, and place it somewhere in your file Main.php. From there, you can work on customizing the display.

przemo

  • Jr. Member
  • **
  • Posts: 81
  • Director ;)
Re: Most Viewed Ads
« Reply #23 on: February 20, 2012, 06:32:52 pm »
Welcome! Unfortunately, I am very weak in programming, etc. My developer went to another country, so I can not do this alone.

In the posts above, I have given my code main.php please someone good for the insertion of this. I'll be really grateful.

I wait and thank you very sincerely,
Przemek

navjottomer

  • Tutor
  • Sr. Member
  • *
  • Posts: 378
  • I am here
Re: Most Viewed Ads
« Reply #24 on: March 01, 2012, 08:03:34 pm »
Is it possible to show popular ads for today only.

Jesse

  • Hero Member
  • *****
  • Posts: 631
  • Out of my mind, back in 5 minutes
Re: Most Viewed Ads
« Reply #25 on: March 02, 2012, 01:13:18 am »
Yes, that could be done. Just change this line of code in the plugin's index.php file to reflect that you only want results WHERE dt_date = "todays date" (I don't know exactly what the correct code for "todays date" should be for comparison).

Code: [Select]
$results=$conn->osc_dbFetchResults("SELECT fk_i_item_id, i_num_views FROM %st_item_stats ORDER BY fk_i_item_id ASC", DB_TABLE_PREFIX);

navjottomer

  • Tutor
  • Sr. Member
  • *
  • Posts: 378
  • I am here
Re: Most Viewed Ads
« Reply #26 on: March 02, 2012, 06:41:52 am »
I changed it something like this and it is working perfect.

Code: [Select]
$results=$conn->osc_dbFetchResults("SELECT fk_i_item_id, i_num_views FROM %st_item_stats WHERE DATE(dt_date) = DATE(NOW()) ORDER BY fk_i_item_id ASC ", DB_TABLE_PREFIX);

przemo

  • Jr. Member
  • **
  • Posts: 81
  • Director ;)
Re: Most Viewed Ads
« Reply #27 on: March 05, 2012, 02:11:28 pm »
Welcome!
The Annex gives main.php my code from the template of "modern". Please insert this plugin to me: (. I installed it already in the admin panel. My site: www.jasielskie.org.pl (please insert where it is written in Polish, "the most popular ads."

« Last Edit: March 05, 2012, 02:24:37 pm by przemo »

Alexandr

  • Full Member
  • ***
  • Posts: 126
Re: Most Viewed Ads
« Reply #28 on: March 08, 2012, 02:42:43 pm »
Hello!
how to display ads on the page similar ads
Similar ads under the heading «Animals»
Similar ads under the heading «Cars»
.......

Jesse

  • Hero Member
  • *****
  • Posts: 631
  • Out of my mind, back in 5 minutes
Re: Most Viewed Ads
« Reply #29 on: March 09, 2012, 10:33:20 am »
Alexandr,

The feature you're asking for is completely different from the one discussed in this topic. Please start a new topic to post your question. Basically, you'd need a new plugin to display "similar ads". It would certainly be a very useful plugin, and one others have also asked for. Perhaps you could post this under "Suggestions"?