Add Custom Profile Field from data of table on mysql

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Suggested Hosts
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
Nachonal
Registered User
Posts: 14
Joined: Thu Jan 15, 2015 9:25 pm

Add Custom Profile Field from data of table on mysql

Post by Nachonal »

Hey there!

Just I wanna create a few custom profile field from a column of a data stored on mysql to Viewtopic.

I have a table called phpbb_payforlinks (just an addon of Ultimate Points) inside we can find two columns:
- user_id_buy: Are all the links bought by each user. each row has an id of the buyer.

- user_id_prop: Are all the links published by each user. each row has an id of the publisher.

a) Just I wanna add two custom profile fields where counts how many links were published and bought in each user.

b) Add another custom profile field with the ratio from the two previosly values (counts prop/counts buy)

if there no have any of them the value is "0".

In total are three new values for viewtopic profile fields.
Example:

User X
Links Downloaded: 30
Links Uploaded: 3
Ratio Download: 0,1
Somebody can help me, and tell me how I can put that info?

Thanks a lot!
Nachonal
Registered User
Posts: 14
Joined: Thu Jan 15, 2015 9:25 pm

Re: Add Custom Profile Field from data of table on mysql

Post by Nachonal »

anyone can help me?

should be like post count on profile field, but just I don't know how do it...

Thanks again
Nachonal
Registered User
Posts: 14
Joined: Thu Jan 15, 2015 9:25 pm

Re: Add Custom Profile Field from data of table on mysql

Post by Nachonal »

last chance? :(
Nachonal
Registered User
Posts: 14
Joined: Thu Jan 15, 2015 9:25 pm

Re: Add Custom Profile Field from data of table on mysql

Post by Nachonal »

strike 3?
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26546
Joined: Fri Aug 29, 2008 9:49 am

Re: Add Custom Profile Field from data of table on mysql

Post by Mick »

You may be better off considering upgrading to 3.1 as support for 3.0 ends on January the 1st, see the announcement above this topic. If and when you do upgrade you may be able to find something in the extensions forums or get some help in extension writers.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
Nachonal
Registered User
Posts: 14
Joined: Thu Jan 15, 2015 9:25 pm

Re: Add Custom Profile Field from data of table on mysql

Post by Nachonal »

Mick wrote:You may be better off considering upgrading to 3.1 as support for 3.0 ends on January the 1st, see the announcement above this topic. If and when you do upgrade you may be able to find something in the extensions forums or get some help in extension writers.
I can't upgrade my site, the mods that I have, are the real reason that Im using 3.0 those mods doesnt exists on 3.1 or 3.2m and without them, Im not interested in phpbb.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26546
Joined: Fri Aug 29, 2008 9:49 am

Re: Add Custom Profile Field from data of table on mysql

Post by Mick »

That's fine and I understand that. Why don't you make an extension request anyway, someone may be willing to take it on? If it happens you can test it on a local server.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
Nachonal
Registered User
Posts: 14
Joined: Thu Jan 15, 2015 9:25 pm

Re: Add Custom Profile Field from data of table on mysql

Post by Nachonal »

Mick wrote:That's fine and I understand that. Why don't you make an extension request anyway, someone may be willing to take it on? If it happens you can test it on a local server.
are a lot mods to recode =(

Hope somebody can help me with this little request, is just take an info from a table to show in viewtopic

I suspect that the first part its something like this:

Code: Select all

SELECT user_id_buy, COUNT(*)  
FROM phpbb_payforlinks


but into php I don't know how do it
Locked

Return to “[3.0.x] Support Forum”