How to make a alphauserpoints rule linked with flexicontent

More
13 years 6 months ago #16021 by boulij
Hi,
i'm using alphauserpoints and flexicontent.
I would like to have a AUP'rule that give points to a user when he's submiting an article. AUP do it but only with the joomla core submit form.
Is there anyone who know how to modify the AUP rule in order to take in consideration flexicontent? (or made a new one)

Thank you

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #16034 by micker
maybe in code a plugin ...
but i am not a dev sorry i can't help you :oops:

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #16172 by boulij
Hi,

Alphauserspoints explain how to create a rule. We have to add the code below under the code which do the action we want to generate points.
But in flexicontent, where is the code (which file and which part of it) which manage the fact to submit a content and add it to the database.
Anyone as a clue?

$api_AUP = JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php';
if ( file_exists($api_AUP))
{
require_once ($api_AUP);
AlphaUserPointsHelper::newpoints( 'nom_de_la_fonction' );
}

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago - 13 years 5 months ago #16669 by ggppdk
You can try changing the system plugin alphauserpoints.php

Goto to line 152 of file:
/plugins/system/alphauserpoints.php

Replace:
Code:
if ( $option=='com_content' )
with:
Code:
if ( $option=='com_content' || $option=='com_flexicontent' )

UPDATE 8 July 2011: The same code appears twice in this file you can change it twice if you want (second appearance is for saving existent article)

Because other basic post/url variables like task,id,title are the same, it should work.

Note that i dont have alphauserpoints installed to test this. Tell me if it worked.

This change should add points when a new article is submit through flexicontent submit form

UPDATE 8 July 2011: Please see a following post of mine for more modifications.

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 13 years 5 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #16674 by micker
your are a great source of help !!!
thanks

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #16824 by gswahhab
Big thanks on the nice easy fix ggppdk. This worked perfectly.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.779 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline