JCow’s Events Join Modification
4:32 pm in Elgg, JCow by emran
I love jcow script.it is very nice and faster. It is very simple to implement in production website though some modification is required.
I found that in the Event module, “i want to join” button always keep front even user already clicked the join button.it should not show if user already join on the event.
It can be changed easily.Please follow the steps to modify:
1. Go to modues/events/events.php
2. go to line no 70. where u will find hook_viewstory() function.
then you place code as following.
3. Now refresh the events page and check that it will not show if you already join the event.
That’s all






what is the 2nd line add I cant see it
the second line to add this:
if(!in_array($client['id'],$uids){
button(‘events/joinit/’.$row['id'],t(‘I want to join’));
}
that’s it..
Hi emran,
Mate I’m getting a error message any ideas..
Parse error: syntax error, unexpected ‘{‘ in/public_html/modules/events/events.php on line 77
This is what Ive got
http://indexjunkie.com/images/37821424038256742495.png
try this code:
if(!in_array($client['id'],$uids)){
button(‘events/joinit/’.$row['id'],t(‘I want to join’));
}
Awesome that fixed it cheers once again…
Hi any chance of a update for 4.1 as these fixes dont work when you upgrade versions…
i did not give a try with 4.1 yet. I am right now at dubai, participating Gitex Week 2010.i will give a try later and update the script..!
Nice dubai aye good one ,Yea cheers mate when you have time
Any updates yet mate
hi
i get back from Gitex.I have instaleld 4.1 and tried same code.it works. you can put same code at 4.1 version.it will work.
Hi,
Yea um Here is my code all I am getting is a blank page.
function hook_viewstory($row) {
global &client;
button(‘events/joinit/’.$row['id'],t(‘I want join’));
$output .=’‘.t(‘Joined members’).’:‘;
$uids = unserialize($row['text1']);
if(!in_array($client['id'],$uids)){
button(‘events/joinit/’.$row['id'],t(‘I want to join’));
}
Any ideas
Sorry forget my last post I put a ‘ &’ in instead of a ‘ $ ‘ lol doh it was a long night last nite anyway thanks for that..
Hi Emran,
Could you help me with a little bug in events mod from the image the posted by and line are in the wrong place any idea on how to fix..
http://indexjunkie.com/images/29265320761448268739.png
Understandable Poing…
I will look into it…
Hmm…..
Good write-up, I’m normal visitor of one’s web site, maintain up the nice operate, and It is going to be a regular visitor for a long time. “There is a time for departure even when there’s no certain place to go.” by Tennessee Williams….