vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Major Additions - Classifieds (https://vborg.vbsupport.ru/showthread.php?t=205465)

MaryTheG(r)eek 02-22-2009 05:39 AM

Quote:

Originally Posted by misticjeff (Post 1751178)
I go to myforums/classifieds.php and can then see the usual stuff with navigation on the left side and the category i created next to that in the middle. I then click on either "add classified" or "post yours now", input my classified ad and then click "Save" and then get the error:


As I posted in the screen shot above, I've enabled everything, given myself permissions as both an admin and in every other usergroup I have but still cannot save a new ad.

I also logged in as just a registered user to try it and same result.


Jeff

Seems that for some reason during the time that you're writting the Ad, you're loosing the session (you logout by the system). At that part, and for more security, there are 2 permissions checks. One during entering the form (which you pass it) and the 2nd when the system is trying to save the data. Seems that at this point the system can't authenticate you.

Could you please PM your URL to try to post an Ad?

Mary

dknelson 02-22-2009 11:30 AM

This is an interesting mod but can somebody tell me if there are expiration times for the ads. Can you set, for example, 30 days after which the ads will automatically be deleted?

misticjeff 02-22-2009 01:39 PM

Quote:

Originally Posted by dknelson (Post 1751324)
This is an interesting mod but can somebody tell me if there are expiration times for the ads. Can you set, for example, 30 days after which the ads will automatically be deleted?

Yes...

When you create your categories, you can set the following:

Code:

Action on Item expiration
Hide or Delete
Code:

Number of days after which ad expires (0 = no expiration)
In this category only



then when actually creating/placing an ad:

Code:

Expires at (laeve empty for no expiration):
choose your date for expiration


So I would think the best choice might be to set the category setting to something like 30 days and then individual ads to 7, 14, etc....

dknelson 02-22-2009 03:22 PM

Well, I've got this installed and added a category to test. I have my usergroup set to allow me to post an ad but am having the same problem as the poster above. When I try to "save" my ad, I too get the "no permissions" error. Usergroup is set to allow me to do so but it's not working. I'm running 3.8.1.

MaryTheG(r)eek 02-22-2009 03:35 PM

Quote:

Originally Posted by dknelson (Post 1751497)
Well, I've got this installed and added a category to test. I have my usergroup set to allow me to post an ad but am having the same problem as the poster above. When I try to "save" my ad, I too get the "no permissions" error. Usergroup is set to allow me to do so but it's not working. I'm running 3.8.1.

I've registered to his site, but still I'm waiting his authorization to be able to login and check it. If you want me to check your, PM me or post here your URL.

Mary

jvancamp 02-22-2009 03:40 PM

This is an awesome add on. I got it installed and working great. I do have a question for other users of this add on.
Does anyone know if there is a way to show the newest ad's say the last 3 or 4 on the home page of a VbAvanced website? Similar to the Newest column shown in the classifieds screen showing the little picture of the item.

MaryTheG(r)eek 02-22-2009 04:00 PM

Quote:

Originally Posted by jvancamp (Post 1751514)
This is an awesome add on. I got it installed and working great. I do have a question for other users of this add on.
Does anyone know if there is a way to show the newest ad's say the last 3 or 4 on the home page of a VbAvanced website? Similar to the Newest column shown in the classifieds screen showing the little picture of the item.

If I'll have some free time I'll post blocks for vBa next weekend. But in general, you can use the query including in classifieds.php or classifieds/includes/functions.php

Mary

MaryTheG(r)eek 02-22-2009 04:12 PM

Quote:

Originally Posted by jvancamp (Post 1751514)
This is an awesome add on. I got it installed and working great. I do have a question for other users of this add on.
Does anyone know if there is a way to show the newest ad's say the last 3 or 4 on the home page of a VbAvanced website? Similar to the Newest column shown in the classifieds screen showing the little picture of the item.

I think that it should works. Paste the code in a file and name it as_you_want.php Upload it to vBa modules directory and then from your AdminCP choose: vBa CMPS->Add Module->PHP File and setup it as:

Module Title : Anything you want to appear as title
Column : Left or Right for side modules, Center for Central modules.
Display order : Better let it blank
Active : YES
Update all pages : It's up to you
File to include : From the droplist choose the right file
Template used : Let it blank
Module Parent : None
Identifier : A good way is to write the file name without ".php"
Clean File Output : YES
Use Module Shell Template : YES
Module Link : Let it blank
Title Row Colspan : Let it blank
Form Code : Let it blank
Usergroups: It's up to you

Quote:

<?
$categories = $db->query_read("SELECT id, name FROM ".TABLE_PREFIX."classifieds_categories ORDER BY displayorder");
$condfield = "categoryid";
$do = "category";
$whatid = "catid";
$columns = intval($vbulletin->options["classifieds_catlistingcolumns"]);
$adsnumber = intval($vbulletin->options["classifieds_catlistingadspercategory"]);;
$html = '';
$count = 0;
$col = 0;
$now = time();
if($db->num_rows($categories) != 0) {
$html = '<table width="100%">';
while($cat = $db->fetch_array($categories)) {
if($col == 0)
$html .= '<tr>';
$title = sanitize_title($cat["name"]);
$adslisting = '';
$ads = $db->query_read("
SELECT id, title
FROM ".TABLE_PREFIX."classifieds_ads
WHERE $condfield=".$cat["id"]." AND active=1 AND hidden=0 AND approved=1
AND publishdate<=$now AND (expirationdate=0 OR expirationdate>$now)
ORDER BY publishdate DESC, activateddate DESC LIMIT $adsnumber");
while($ad = $db->fetch_array($ads)) {
$adtitle = sanitize_title($ad["title"]);
eval('$adslisting .= "' . fetch_template('classifieds_categorieslistingadlin e') . '";');
}
if($db->num_rows($ads) == 0)
$adslisting = '<tr><td><div align="center" class="smallfont">'.$vbphrase["classifieds_no_ads_in_category"].
"<a href=\"classifieds.php?do=editad&$whatid=".$cat['id']."\">".$vbphrase["classifieds_post_your_now"]."</a>".'</div>';
eval('$html .= "' . fetch_template('classifieds_categorieslistingblock ') . '";');
$col++;
if($col == $columns) {
$html .= '</tr>';
$col = 0;
}
$count++;
}
if($col != 0 && $count > 0)
$html .= '</tr>';
$html .= '</table>';
}
?>

Phoenix81377 02-22-2009 06:59 PM

Installed on 3.8.1 and it seems to be working well! I will definitely update with any questions! Thanks for the great mod!

TheSupportForum 02-22-2009 08:15 PM

i am getting a blank page

please can this be fixed

any suggestion or if author that correct this and post an update

done all the suggestions and permissions and still blank page i am using 3.8.1


All times are GMT. The time now is 09:09 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01519 seconds
  • Memory Usage 1,758KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete