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

blind-eddie 01-17-2007 02:12 AM

deleted

Johnny Utah 07-31-2007 12:39 AM

Does anybody know if this works with VBAdvanced 3.0?? It seems like the directions are for a different version.

Johnny Utah 07-31-2007 06:18 PM

Nobody else has used this module with VBA CMPS 3?

LCN2007 10-02-2007 04:21 AM

Is anyone else having a hard time making a module for me its messed up and it throws my login/register page out of wack

i would love to use this on my home but it seems the code needs work the people who have it working could you post your module/template code plz so i could compare.

LCN2007 10-04-2007 05:21 PM

Bump

inciarco 10-25-2007 12:59 AM

I've Tried The Module Process Manually But It Didn't Worked!! :(

I've Tried the Process Via "Download/Upload Module" with the File "marketplacead.module" and It Worked Great!! :)

Of course the Template Shall Be Created Manually Via "Template Edit" on Each Style of The Forum!! :p

I Hope This Helps Forumers That Have Tried the Manual Create Module Way and Haven't Got Any Successful Result!! :up:

My Best Regards!! ;)

:)

powerful_rogue 11-12-2007 01:09 PM

Quote:

Originally Posted by inciarco (Post 1367962)
I've Tried The Module Process Manually But It Didn't Worked!! :(

I've Tried the Process Via "Download/Upload Module" with the File "marketplacead.module" and It Worked Great!! :)

Of course the Template Shall Be Created Manually Via "Template Edit" on Each Style of The Forum!! :p

I Hope This Helps Forumers That Have Tried the Manual Create Module Way and Haven't Got Any Successful Result!! :up:

My Best Regards!! ;)

:)

Hi,

Ive tried to get this to work, but not having much luck :(

I notice that this was created for geos version of SR Classified Lite before quaterbore took over developement and recoded it.

Is anyone able to advise of the updates need to this code to make it work?

powerful_rogue 11-12-2007 01:55 PM

Ive had a play around a bit more and it kind of works, however it stretchs the whole page and throws everything off :confused:


All times are GMT. The time now is 04:42 AM.

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.01210 seconds
  • Memory Usage 1,782KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete