vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Mini Mods - Module for SR Classifieds in VB CMPS (https://vborg.vbsupport.ru/showthread.php?t=129053)

toolblast 10-13-2006 10:00 PM

Module for SR Classifieds in VB CMPS
 
Module for SR Classifieds in VB CMPS

Hi all. The point of this is quite simple, I wanted a module for VB CMPS to show random ads from Gio~logist's SR Classifieds script.

Note: I take no credit for the coding within this hack... Gio~logist is the creator of SR Classifieds, and it is his code. I simply tweaked it to make it into a module for cmps... it is quite a simple job and only took a few minutes.

The code I am working off of is the free 'lite' version of the script.


This will let you add a module to your vbadvanced CMPS portal that will randomly show ads in your classifieds database.

Thanks.

see screenshot attached. ZIP ATTACHED.



toolblast 10-14-2006 05:54 AM

First post reserved. :) Enjoy the module!

Milad 10-14-2006 01:37 PM

Thanks

will install it ASAP

Milad 10-14-2006 03:35 PM

your pho file contains unnessecary code for example:

PHP Code:

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT''sr_classifieds');

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(
    
'sr_classifieds',
    
'threadmanage'
    
'posting'
);

$specialtemplates = array(
    
'smiliecache',
    
'bbcodecache',
    
'attachmentcache',
);

$globaltemplates = array(
    
'sr_classifieds_main',
    
'sr_classifieds_categorybit',
    
'sr_classifieds_new',
    
'sr_classifieds_category',
    
'sr_classifieds_search',
    
'sr_classifieds_viewad',
    
'sr_classifieds_adbit',
    
'sr_classifieds_adbit_extra_fields',
    
'sr_classifieds_extra_fields',
    
'sr_classifieds_edit',
    
'sr_classifieds_feedbit',
    
'sr_classifieds_user',
    
'sr_classifieds_newadbit',
    
'sr_classifieds_newfeedbit',
    
'sr_classifieds_categorysidebit',
    
'newpost_attachment',
    
'newpost_attachmentbit',
    
'editor_clientscript',
    
'editor_jsoptions_font',
    
'editor_jsoptions_size',
    
'editor_smilie',
    
'editor_smiliebox',
    
'editor_smiliebox_row',
    
'editor_smiliebox_straggler',
    
'editor_toolbar_on',
    
'newpost_disablesmiliesoption',
);

$actiontemplates = array();
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
//$site = $_SERVER['HTTP_HOST'];
//require_once("http://www.siteresort.com/sitecheck.php?&site=$site");

//The Code Below May Not Be Taken Off Or Legal Action May Be Taken
$footer "$vbphrase[sr_classifieds_copyright] $footer";

// Check To See If Usegroup Can Use System
if(!($permissions['sr_classifieds'] & $vbulletin->bf_ugp['sr_classifieds']['canuse'])){
print_no_permission();
}

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
if (empty($_REQUEST['do']))
{
    
$_REQUEST['do'] = 'main';
}


// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
if ($_REQUEST['do'] == 'main'){ 


Milad 10-14-2006 03:38 PM

and
PHP Code:

    // Newest Ads
     
$newads_get $vbulletin->db->query_read("
        SELECT classified.classifiedid AS classifiedid, classified.categoryid AS categoryid, classified.userid AS userid, 
        classified.dateline AS dateline, classified.timeframe AS timeframe, classified.title AS title, classified.price AS price, 
        classified.type AS type, user.*,
        upload.classifiedid, upload.image AS image
        FROM " 
TABLE_PREFIX "sr_classifieds AS classified
        LEFT JOIN " 
TABLE_PREFIX "sr_classifieds_uploads AS upload ON (upload.classifiedid=classified.classifiedid)
        LEFT JOIN " 
TABLE_PREFIX "user AS user ON (user.userid=classified.userid)
        ORDER BY dateline DESC
        LIMIT 
$newadlimit
    "
);

    while(
$newad $vbulletin->db->fetch_array($newads_get)){
    
$newad[dateline] = vbdate($vbulletin->options['dateformat'], $newad['dateline'], '''');
    eval(
'$newadbit .= "' fetch_template('sr_classifieds_newadbit') . '";');
    } 


toolblast 10-14-2006 04:36 PM

I used the part of the php code displaying the main classifieds page only. You can remove the unncessary code.

Jon_Simmonds 10-14-2006 08:28 PM

I thought quaterbore (sp) released a similar hack on the sr classifieds forums

toolblast 10-14-2006 09:29 PM

Quote:

Originally Posted by Jon_Simmonds
I thought quaterbore (sp) released a similar hack on the sr classifieds forums

Ya, he PM'd me about releasing some code me made to Gio~logist to put in the pro version... but I never saw that code and I only have the lite version. I wasn't able to find anything released on vb.org. What is the url to it on vb.org? I'd much rather use a proper hack than the quick one I stuck together in a few minutes. As long as it works im happy :)

I dont see anything released here... https://vborg.vbsupport.ru/member.php?u=80196 Are you sure he released it on vb.org?

Quarterbore 10-16-2006 01:25 PM

Thanks to all and yes I had created a module for the "premium version" and I have the code as it was posted on that other site that is now turned off. I have a new project that I am trying to start that this code will be used with...

I am just getting started but I hope to have a version of my own classifieds script out in the near future. Feedback is welcome at vbclassified.com but I don't have a product I can share yet...

toolblast 10-16-2006 02:31 PM

Quote:

Originally Posted by Quarterbore
Thanks to all and yes I had created a module for the "premium version" and I have the code as it was posted on that other site that is now turned off. I have a new project that I am trying to start that this code will be used with...

I am just getting started but I hope to have a version of my own classifieds script out in the near future. Feedback is welcome at vbclassified.com but I don't have a product I can share yet...

Can't wait :) keep me posted


All times are GMT. The time now is 01:13 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.01367 seconds
  • Memory Usage 1,766KB
  • 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
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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