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)
-   -   Integration with vBulletin - Phpclassifieds integration with vbulletin (https://vborg.vbsupport.ru/showthread.php?t=124444)

ndahiya 08-19-2006 10:00 PM

Phpclassifieds integration with vbulletin
 
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.

Edog 08-20-2006 08:08 AM

Installed works great .. yea having it read the forum skin would rock.

ndahiya 08-20-2006 10:55 AM

Quote:

Originally Posted by BETIServices
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.
Code:

{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

Quote:

Originally Posted by BETIServices
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

Quote:

Originally Posted by Edog
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...


All times are GMT. The time now is 04:45 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.01176 seconds
  • Memory Usage 1,739KB
  • 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
  • (1)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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