Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Module for SR Classifieds in VB CMPS Details »»
Module for SR Classifieds in VB CMPS
Version: 1.00, by toolblast toolblast is offline
Developer Last Online: Mar 2019 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.6.2 Rating:
Released: 10-13-2006 Last Update: Never Installs: 32
 
No support by the author.

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.


Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 10-14-2006, 05:54 AM
toolblast's Avatar
toolblast toolblast is offline
 
Join Date: Mar 2004
Posts: 266
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First post reserved. Enjoy the module!
Reply With Quote
  #3  
Old 10-14-2006, 01:37 PM
Milad's Avatar
Milad Milad is offline
 
Join Date: Apr 2005
Location: Syro
Posts: 663
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks

will install it ASAP
Reply With Quote
  #4  
Old 10-14-2006, 03:35 PM
Milad's Avatar
Milad Milad is offline
 
Join Date: Apr 2005
Location: Syro
Posts: 663
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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'){ 
Reply With Quote
  #5  
Old 10-14-2006, 03:38 PM
Milad's Avatar
Milad Milad is offline
 
Join Date: Apr 2005
Location: Syro
Posts: 663
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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') . '";');
    } 
Reply With Quote
  #6  
Old 10-14-2006, 04:36 PM
toolblast's Avatar
toolblast toolblast is offline
 
Join Date: Mar 2004
Posts: 266
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I used the part of the php code displaying the main classifieds page only. You can remove the unncessary code.
Reply With Quote
  #7  
Old 10-14-2006, 08:28 PM
Jon_Simmonds Jon_Simmonds is offline
 
Join Date: Nov 2005
Location: UK
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I thought quaterbore (sp) released a similar hack on the sr classifieds forums
Reply With Quote
  #8  
Old 10-14-2006, 09:29 PM
toolblast's Avatar
toolblast toolblast is offline
 
Join Date: Mar 2004
Posts: 266
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #9  
Old 10-16-2006, 01:25 PM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #10  
Old 10-16-2006, 02:31 PM
toolblast's Avatar
toolblast toolblast is offline
 
Join Date: Mar 2004
Posts: 266
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:32 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04650 seconds
  • Memory Usage 2,323KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete