View Full Version : Integration with vBulletin - Phpclassifieds integration with vbulletin
ndahiya
08-19-2006, 10:00 PM
Hi
Please see below for working code to integrate vbulletin and phpclassifieds. Phpclassifieds ( http://www.deltascripts.com ) is one of the best classifieds scripts out there, free for non-profit use...
This integration works with vb 3.6 and phpclassifieds 7.1 . Will likely work with vB 3.5 but not tested.
----
Highlights:
"Lead" database is vBulletin.
Automatic login into phpclassifieds if logged in vBulletin (just need to click on login). Automatically creates user if none found.
Automatically updates name/email in phpclassifieds as and when they change in vBulletin.
If needed, the two applications can be "separated" easily later. Only restriction is that passwords for "transferred accounts " will need to be reset in phpclassifieds.
----
NOTE:
* This integration assumes field1 (in vBulletin) contains the "display name". If you wish to use the username instead of field1, just replace $vbulletin->userinfo['field1'] with $vbulletin->userinfo['username'] in member_login.php.
* It assumes no extra mandatory fields in phpclassifieds. The code would be more complicated with that.
* Assumes forums are installed in http://site/forums. If elsewhere, need to change links to the forums in the phpclassifieds templates only.
* Make sure you turn off email verification in PHPClassifieds. Let vBulletin handle that.
----
Installation Instructions:
* Phpclassifieds files to replace: 1
* Phpclassifieds Templates to edit/replace: 4
* SQL query to run: 1
* Product/Plugin in vbulletin: 1
* Install time: ~20 minutes
* Edit the variables on top of member_login.php. If you like, you can also change the vbulletin membergroups who are allowed access (find $usergroupid = $vbulletin->userinfo['usergroupid']; in the file).
* Upload member_login.php to "classifieds-path/".
* Edit PHPClassifieds templates (details in the attached file).
* If not already present, create a unique key on user_email field in phpclass_user table.
SQL Code: CREATE UNIQUE INDEX user_email ON phpclass_user (user_email);
* Import PRODUCT file product-phpclass_integration.xml in vBulletin (Used to "push" email changes to phpclassifieds).
* Go to PLUGIN "Update PHPClassifieds Email", select "Edit", and replace the mysql database/user/password info for the phpclassifieds database. Also, if your phpclassifieds user table is not "phpclass_user", please change it to the value you're using.
* That's it! You're set.
---
Version
1.00b: Original Release
1.02b: Fixes member_login.php file to automatically delete expired ads if auto mode is set. Just Replace the file in "classifieds-path/".
ndahiya
08-20-2006, 03:20 AM
reserved.
btw, support for this integration will most likely be light coz I am not much of a coder...
BETIServices
08-20-2006, 05:11 AM
Well I will be adding this to my collection :D
utw-Mephisto
08-20-2006, 05:35 AM
Do you have a demo running which I could check ?
BETIServices
08-20-2006, 06:31 AM
My Demo after the install: http://www.betisforum.com/classifieds/
Works well the only thing I would love is a page intergraded with the forum .... wow
BETIServices
08-20-2006, 06:43 AM
I also like to ask, how can I take the option: Delete my registration and delete my ads. from the file member_change.php as I like to block that also from hapening.
Installed works great .. yea having it read the forum skin would rock.
ndahiya
08-20-2006, 10:55 AM
I also like to ask, how can I take the option: Delete my registration and delete my ads. from the file member_change.php as I like to block that also from hapening.
That is relatively easy to do in the template member_change.tpl
Find and delete this code at the end of the template.
{if !$admin_Area}
<center><a href='member_change.php?delete_me=1'><font color='red'><b><u>{$smarty.const.LA_DELETE_ME}</u></b></font></a></center>
{/if}
Note that "Delete my registration and delete my ads" DOES NOT delete the vb registration. similarly, for now, deleting a vb profile does not delete the ads or the phpclass user, but that can be a relatively simple extension.
ndahiya
08-20-2006, 10:58 AM
My Demo after the install: http://www.betisforum.com/classifieds/
Works well the only thing I would love is a page intergraded with the forum .... wow
not sure if you have modded the templates yet, coz on the login page, you get 2 sets of logins...
ndahiya
08-20-2006, 11:00 AM
Installed works great .. yea having it read the forum skin would rock.
need to edit the file classfieds/style.css
not sure if there is a way to "auto" integrate it as the class names are all diff and it would be a pain to mod all templates...
BETIServices
08-20-2006, 10:41 PM
That is relatively easy to do in the template member_change.tpl
Find and delete this code at the end of the template.
{if !$admin_Area}
<center><a href='member_change.php?delete_me=1'><font color='red'><b><u>{$smarty.const.LA_DELETE_ME}</u></b></font></a></center>
{/if}
Note that "Delete my registration and delete my ads" DOES NOT delete the vb registration. similarly, for now, deleting a vb profile does not delte the ads opr phpclass user, but that can be a relatively simple extension.
It worked perfect! I though that that option will delete the registration on VB... I will leave as is since it will not do that.
Thanks
BETIServices
08-20-2006, 10:45 PM
not sure if you have modded the templates yet, coz on the login page, you get 2 sets of logins...
No mods on the tample.. is as I download the script, if everything works well I will purchase a Lic. for my boards.. for now will be testing.
Not to post again, I have a problem getting the RSS working... is not working for me and without that feature I have not interest on getting that script yet and paid money...
ndahiya
08-20-2006, 11:57 PM
No mods on the tample.. is as I download the script, if everything works well I will purchase a Lic. for my boards.. for now will be testing.
Not to post again, I have a problem getting the RSS working... is not working for me and without that feature I have not interest on getting that script yet and paid money...
RSS not working is some other prob... this code does not change that AT ALL.
did you change the footer template? that might have introduced an error... i noticed your RSS path is /classifieds/images/rss.xml should be /classifieds/rss.xml
you can mod the phpclassifieds templates without buying a license...
BETIServices
08-21-2006, 01:18 AM
RSS not working is some other prob... this code does not change that AT ALL
I was wondering if anyone is having the same problem witch like you said .. is has nothing to do with the mod it self.
did you change the footer template? that might have introduced an error... i noticed your RSS path is /classifieds/images/rss.xml should be /classifieds/rss.xml
I did not change anything but I will double check since maybe is a setting problem, I was wondering why it was pointing to images but I never used the program before until now.
ndahiya
08-21-2006, 01:40 AM
I did not change anything but I will double check since maybe is a setting problem, I was wondering why it was pointing to images but I never used the program before until now.
are you using the latest download of phpclassifieds ? if yes, it is poss a new bug may have been introduced since the prev release of 7.1. (sometimes version control can be iffy).
However, based on what is planned with the next version of phpclass, the mod should work seamlessly with 7.2 (expected in the next 1-3 weeks, based on discussion on those forums).
The unique index on phpclass_user (email) would probably be a part of the next phpclassifieds version (its really a bug/missing item in the current version), but besides that, most of the changes are front end, rather than core phpclassifieds code...
BETIServices
08-21-2006, 01:43 AM
Well, guess what after I check you post and you said it should be in the classifieds folder for RSS is now working for me :D
That's all I need for now, I will try to make it look like my site the best I can.
Thanks again :D
ndahiya
08-24-2006, 01:59 PM
To upgrade to 1.02b, just replace member_login.php
This upgrade is *required* if you use auto mode (as opposed to using a cron task) to clear expired ads. Without this, ads will never be removed even after expiry.
Hello,
I played with this on a 3.5 site. The plugin calls for "executionorder" in fieldlist, and 3.5 doesn't use that so there is a sql error. It appears to still install the required info though.
ndahiya
09-08-2006, 11:13 AM
the plugin can be manually created, instead of using the product (just copy the plugin code from the product description file)... if you do that, this should work with 3.5.
toolblast
09-25-2006, 04:54 AM
Help please! I cant seem to get this to work!
I followed all the steps in the readme... yet when I go to the login php file (member_login.php) it just redirects to 'install.php' (which is a 404 error since I erased it after installing classifieds).
All variables in the login php file are changed to what they should be, and the vb product and plugin imported fine. The plugin database values have also been changed.
What do I do?? :(
toolblast
09-25-2006, 05:02 AM
My Demo after the install: http://www.betisforum.com/classifieds/
Works well the only thing I would love is a page intergraded with the forum .... wow
http://www.betisforum.com/classifieds/
BETI's goes to the install file... similar to me, except it goes to the install file only when I go to the login php page
ndahiya
09-25-2006, 10:41 AM
looks like it is a file permission problem... when you go on the install page, it can not access classifieds/admin/config, which makes it think it needs to install it again... do a clean install of phpclassifieds that works, and then do the integration...
myplacidcasual
10-04-2006, 07:37 AM
I'm sure this is a simple problem related to: $vbulletin->userinfo['field1'] and
$vbulletin->userinfo['username'] I just don't really understand where, how and what to change:
My problem is this:
I just don't know where to go to change
But on my site when you go to the member area it says, "Logged in as:" and no user name.
What should I do to fix this.
ndahiya
10-06-2006, 01:46 AM
I'm sure this is a simple problem related to: $vbulletin->userinfo['field1'] and
$vbulletin->userinfo['username'] I just don't really understand where, how and what to change:
My problem is this:
I just don't know where to go to change
But on my site when you go to the member area it says, "Logged in as:" and no user name.
What should I do to fix this.
Might be:
* This integration assumes field1 (in vBulletin) contains the "display name". If you wish to use the username instead of field1, just replace $vbulletin->userinfo['field1'] with $vbulletin->userinfo['username'] in member_login.php.
just search for field1 in the file and replace with username (maybe more than 1 instance)...
myplacidcasual
10-09-2006, 08:22 AM
Figured it out. I'm sort of a newbie to all the vbulletin features so I'd forgotten that the profile fields are managed in the admin cp and that field 1 simply didn't exist in my vbulletin profile. Yay it works!
ndahiya
10-09-2006, 10:55 AM
if someon can work out how to delete a profile in phpclassifieds when a profile is deleted in vbulletin, it'll be super.
the prob i faced is that a php file needs to be called when a user is deleted (coz you do not want to delete direct from db, which will leave orphan info), but can't call php files from a plugin ?
Greek76
10-14-2006, 08:06 PM
Your post says its free but when I attempt to download its asks you to buy a license? Am I downloading the wrong one?
ndahiya
10-15-2006, 12:42 AM
phpclass is free for non commercial use.... but you can download it and install it without any password etc... deltascripts.com
parajsa
03-20-2007, 03:51 PM
how about, if u already used the classified as stand alone, and there some users there, can i make the integration, without lossing this users and their respective ads?
thank u in advanced
amjadz4
03-09-2009, 12:59 PM
are you gonna update it to make it work with vbulletin 3.8.1?
thanks! would love to have it!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.