CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • civicrm tables for pcp pages
Pages: [1]

Author Topic: civicrm tables for pcp pages  (Read 1485 times)

jrthor2

  • Guest
civicrm tables for pcp pages
January 14, 2010, 05:37:13 pm
How are the civicrm_pcp and civicrm_pcp_block are linked together?  The civicrm_pcp_block has whether the page is approved or not, and the civicrm_pcp table has the actual content of the pcp.

Thanks

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: civicrm tables for pcp pages
January 14, 2010, 09:30:10 pm
jrthor2 :
civicrm_pcp_block contains the info that is stored about a contribution page that has PCP configured for it. The data which is submitted here in stored in civicrm_pcp_block table : http://sandbox.civicrm.org/civicrm/admin/contribute?reset=1&action=update&id=1&subPage=PCP

Quote
civicrm_pcp table has the actual content of the pcp.

Right, civicrm_pcp has the actual PCP's that you create if the contribution page has the above setting ON. All the PCP's that are approved or not are stored here. The status is stored in civicrm_pcp.status_id

HTH
-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

jrthor2

  • Guest
Re: civicrm tables for pcp pages
January 15, 2010, 02:53:38 am
Correct, but in civicrm_pcp there is an id column, which is unique for each pcp page, but in the civicrm_pcp_block, this same id is not there, so I was wondering if a page has not been approved, so the is_active in civicrm_pcp_block is set to 0, how does civicrm know that it should not display the pcp page with an id of 6, for example?  This id (6) is no where in civicrm_pcp_block.

Sorry if I'm confusing you.  I'm writing a Joomla module that will display a list of all PCP pages that have been approved to my users.  I have it done, and working, but I want to makes sure I understand how these 2 tables are used together to show/not show based on if the page is approved.

Thanks.

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: civicrm tables for pcp pages
January 15, 2010, 03:18:08 am
civicrm_pcp_block does NOT have any information regarding PCP pages. It just stores the contribution page that have PCP configured for them.

Quote
so I was wondering if a page has not been approved, so the is_active in civicrm_pcp_block is set to 0
civicrm_pcp_block.is_active just shows you whether the contribution page whose id = civicrm_pcp_block.entity_id has PCP section enabled OR not.

Quote
how does civicrm know that it should not display the pcp page with an id of 6, for example?
civicrm_pcp.status_id  is actually civicrm_option_value.value where civicrm_option_group.name = 'pcp_status'

The list of statuses for PCP is here :
http://sandbox.civicrm.org/civicrm/admin/optionValue?reset=1&action=browse&gid=12

Hope that helps!
Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: civicrm tables for pcp pages
January 15, 2010, 03:23:45 am
You may also want to check pcpStatus method in CRM/Contribute/PseudoConstant.php which returns you PCP statuses w/ their value which looks up civicrm_pcp.status_id

-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

jrthor2

  • Guest
Re: civicrm tables for pcp pages
January 15, 2010, 04:38:50 am
Thanks, i actually have my module working looking up the status_id without calling the pcpStatus method. 

nightlrd

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: Joomla 1.5
Re: civicrm tables for pcp pages
January 15, 2010, 01:49:54 pm
jrthor2-

Would you consider posting the mod on the JED? There might be a community desire for a mod like this. I know that I was looking for something like that for my orgs site. Just a thought.  ;D

jrthor2

  • Guest
Re: civicrm tables for pcp pages
January 16, 2010, 02:13:11 pm
I've submitted it for approval.  Once it's posted, I'll put a link to it on my joomla extension post here

http://forum.civicrm.org/index.php/topic,11711.0.html

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • civicrm tables for pcp pages

This forum was archived on 2017-11-26.