PDA

View Full Version : Mini Mods - Module for SR Classifieds in VB CMPS


toolblast
14 Oct 2006, 07:53
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.


DONT FORGET TO CLICK INSTALL! (http://www.vbulletin.org/forum/vborg_miscactions.php?do=installhack&threadid=129053)

toolblast
14 Oct 2006, 07:54
First post reserved. :) Enjoy the module!

Milad
14 Oct 2006, 15:37
Thanks

will install it ASAP

Milad
14 Oct 2006, 17:35
your pho file contains unnessecary code for example:


// ####################### 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
14 Oct 2006, 17:38
and // 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
14 Oct 2006, 18:36
I used the part of the php code displaying the main classifieds page only. You can remove the unncessary code.

Jon_Simmonds
14 Oct 2006, 22:28
I thought quaterbore (sp) released a similar hack on the sr classifieds forums

toolblast
14 Oct 2006, 23:29
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... http://www.vbulletin.org/forum/member.php?u=80196 Are you sure he released it on vb.org?

Quarterbore
16 Oct 2006, 15:25
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
16 Oct 2006, 16:31
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
17 Jan 2007, 04:12
deleted

Johnny Utah
31 Jul 2007, 02:39
Does anybody know if this works with VBAdvanced 3.0?? It seems like the directions are for a different version.

Johnny Utah
31 Jul 2007, 20:18
Nobody else has used this module with VBA CMPS 3?

LCN2007
02 Oct 2007, 06:21
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
04 Oct 2007, 19:21
Bump

inciarco
25 Oct 2007, 02:59
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
12 Nov 2007, 15:09
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
12 Nov 2007, 15:55
Ive had a play around a bit more and it kind of works, however it stretchs the whole page and throws everything off :confused: