MyBB Community Forums

Full Version: Make "this call or query"?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all , Im new writing here, Im comming from spanish community of MyBB because nobody can help with this "problem", maybe here yes:

Look, Im creating a gaming community with a random CMS and this cms has an own DB with their own tables (obviously) , the db is called "auth" and the table is called "account" and on account table exists 2 columns "dp"(donation points) and "vp" (Vote points) , I wanna show that 2 informations on profile fields in mybb forum, near rep of users, or under post count ...

As information, I can say that the table "account" into "auth" has USERNAME column like Mybb_Users , and obviously has always the same users as Mybb_Users..

Example of what i Want:

*Look at X user on forum db in MyBB_Users with Username "superman"(for example) and go to the another database called auth and in table Account seeks username "superman"and the numbers in the columns "DP" and "VP" display them in the profile field of forum*

Thanks in advance
It can be done. I can''t go into details because it will take quite some time but in short you will need a plugin for this. Try to put in a request at the request forum and hopefully someone will code it for you.
You will need a plugin that queries the data you want to be displayed on the profile page. This plugin can either be on the MyBB side of things (MyBB queries and displays the data), or it can be a plugin for the CMS (CMS updates every dp/vp change to the user's profile field in MyBB).

The only way to get by without plugin would be if the CMS offers a direct URL which could be used in e.g. an image tag like <img src="/cms/points/userimage.php?uid=123">. This you could put in a profile template. But if your CMS offered such a thing you probably wouldn't have asked about tables and stuff.
uhmm I wanna try make it, because it seems wrong to ask someone to make me the code for free, without even having tried first , Can you give me some link with a guide to make this or somethingr?

Thanks
Uh... a link? To what? php.net? mysql reference manual? docs.mybb.com (on authoring plugins and plugin hooks)? If you don't want to get into plugin development too deeply but just want to write a few lines of code in a hook you can also use my hooks plugin... but...

I don't think there is a guide for specifically displaying vote points anywhere.

If you need more specific answers you should try asking more specific questions.

If you think this is too much of a hassle for you and you'd rather just give someone $10 to do it, PM me, I mean, what the heck. If it's really just two numbers, and if the user names really match exactly (without matching usernames, or UIDs, you have no relation which points belong to whom), this is something you should be able to do in, what, fifteen minutes? Find a hook for the profile page, make a query, put it in a template or whatever.

It's a lot more fun to do this yourself if you have any programming experience whatsoever.
Ok frostschutz, thanks I only know basic php scripts, but dont know "where" and "how" to put it into MyBB, im beter on c++ anyway , I will try your hooks plugin maybe can help me (: And yes Im with you, its more fun try first before request. thanks