Login     Sign up
need one help in Jcow Advanced Admin Tools + Pro core
john mor (@johninhell)
Join date: Oct 15th 2010
Community posts: 159
View Profile
Send Message

hi everyone

i finally updated to jcow 4.2

but here

wen i had installed Jcow Advanced Admin Tools + Pro core

im still not getting one.. function

which id really like 2 have

screen shoot is given :-

[img]http://www.jcow.net/web/images/admin2.jpg[/img]

i'd b really thankful if i'll hav this function too :) :D

will b waiting 4 reply !! thnxc

171 months ago
john mor (@johninhell)
Join date: Oct 15th 2010
Community posts: 159
View Profile
Send Message

here

we can

add roles

from User Roles

but still we can't giv permissions. :|

and i want to set few moderators who can .. manage the forums ( can del them,can recycle them,etc etc.. ) as shown in pic..:) :D

plz help.!!

171 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

you have to set the protected field in jcow_menu to 1 for each menu of type community that you want to protect. After that you set which kind of roles can see these menu.

171 months ago
Vincent T (@vincent)
Join date: Jun 18th 2010
Community posts: 298
View Profile
Send Message

[quote=johninhell]here

we can

add roles

from User Roles

but still we can't giv permissions. :|

and i want to set few moderators who can .. manage the forums ( can del them,can recycle them,etc etc.. ) as shown in pic..:) :D

plz help.!! [/quote]
Forums moderators is not set here. It is set on "Addon tools"->"forums manage"

171 months ago
john mor (@johninhell)
Join date: Oct 15th 2010
Community posts: 159
View Profile
Send Message

[quote=falcone]you have to set the protected field in jcow_menu to 1 for each menu of type community that you want to protect. After that you set which kind of roles can see these menu. [/quote]

here

in the menu in getting this :-

can u explain me .further?

sorry if im asking stupid Q im new :) :D

screen shoots:-

[img]http://socialkin.com/uploads/userfiles/201011/09_42_9rp0s.jpg[/img]
[img]http://socialkin.com/uploads/userfiles/201011/09_42_vnfed.jpg[/img]

171 months ago
john mor (@johninhell)
Join date: Oct 15th 2010
Community posts: 159
View Profile
Send Message

[quote=vincent]
Forums moderators is not set here. It is set on "Addon tools"->"forums manage" [/quote]

i got your point bro

we can manage forums from the addon's

what i want to know is..

like here
[img]http://socialkin.com/uploads/userfiles/201011/09_42_vnfed.jpg[/img]

we can give powers to other members too for managing

news feeds, browse ,manage directory,cache controler , extension management etc too :(

and where as i think from the addon tool...

we can only giv permissions like, if i set a mod and giv him power

but i think i can just giv powers like -

he can reply, n may b delete it too,..

but can he also .. put the topic back from recycle bin ?
can he shift topics? in appropriate place?
can he lock the topics?

171 months ago
john mor (@johninhell)
Join date: Oct 15th 2010
Community posts: 159
View Profile
Send Message

@vincent

sorry giv u wroung pic

[img]http://www.jcow.net/web/images/admin2.jpg[/img]

171 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

this is in your phpMyAdmin

if set to 1, they will show up in the permissions form (the pic you showed)

PS. manege directory, extentions,... are not in it.

171 months ago
john mor (@johninhell)
Join date: Oct 15th 2010
Community posts: 159
View Profile
Send Message

[quote=falcone]this is in your phpMyAdmin

if set to 1, they will show up in the permissions form (the pic you showed)

PS. manege directory, extentions,... are not in it. [/quote]

now where is this phpMYadmin ?
can u giv me a screen shoot or lil brief info ?

171 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

normally it is in the control panel of your server.

it can be cpanel, or directadmin, or plesk or something else.

171 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

but there is another way.

for example for events module

in events.module.php (in modules/events folder)

[code]
function events_menu() {
$items = array();
$items['events'] = array(
'name'=>'Events',
'type'=>'community',
'protected' => 1
);
$items['events/mine'] = array(
'name'=>'Events',
'tab_name'=>'My events',
'type'=>'personal'
);
$items['events/following'] = array(
'name'=>'Following',
'type'=>'tab',
'parent'=>'events/mine'
);
$items['events/friends'] = array(
'name'=>'Friends',
'type'=>'tab',
'parent'=>'events/mine'
);
return $items;
}
?>
[/code]

i added the line

[code]
'protected => 1
[/code]

and a , after 'community'

update this file, go to admin area, modules and click update modules.

now events should show up in the user permissions form

171 months ago
john mor (@johninhell)
Join date: Oct 15th 2010
Community posts: 159
View Profile
Send Message

[quote=falcone]but there is another way.

for example for events module

in events.module.php (in modules/events folder)

[code]
function events_menu() {
$items = array();
$items['events'] = array(
'name'=>'Events',
'type'=>'community',
'protected' => 1
);
$items['events/mine'] = array(
'name'=>'Events',
'tab_name'=>'My events',
'type'=>'personal'
);
$items['events/following'] = array(
'name'=>'Following',
'type'=>'tab',
'parent'=>'events/mine'
);
$items['events/friends'] = array(
'name'=>'Friends',
'type'=>'tab',
'parent'=>'events/mine'
);
return $items;
}
?>
[/code]

i added the line

[code]
'protected => 1
[/code]

and a , after 'community'

update this file, go to admin area, modules and click update modules.

now events should show up in the user permissions form [/quote]

bro i guess they changed the codes in 4.2

cuz in
public_html/modules/events/events.php

im getting this :-
<?php
/ ############################################################ \
Copyright (C) 2009 - 2010 jcow.net. All Rights Reserved.

The contents of this file are subject to the Common Public Attribution
License Version 1.0. (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
[url]http://www.jcow.net/celicense.[/url] The License is based on the Mozilla Public
License Version 1.1, but Sections 14 and 15 have been added to cover use of
software over a computer network and provide for limited attribution for the
Original Developer. In addition, Exhibit A has been modified to be consistent
with Exhibit B.

Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
the specific language governing rights and limitations under the License.

The Original Code is Jcow.

The Original Developer is the Initial Developer. The Initial Developer of the
Original Code is jcow.net.

* ############################################################ */

class events extends story{
public $list_type = 'ul';
function events() {
global $nav,$ubase;
$nav[] = url('events',t('Events'));
parent::story();
$this->photos = 1;
$this->act_write = t('Created an event');
$this->write_story = t('Create event');
set_menu_path('events');
}

function hook_writestory($row) {
    $output = '
    <link href="[url]http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css"[/url] rel="stylesheet" type="text/css"/>
    <script src="[url]http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>[/url]
    <script>
    $(document).ready( function(){
        $("#datepicker").datepicker({
            onSelect: function(date, instance) {
                    $("#event_date").val(date);
            }
        });

    });

    </script>
    <div style="padding-left:20px">
        <table border="0"><tr><td>
        <div type="text" id="datepicker"></div>
        <input type="hidden" name="date" id="event_date" value="'.date('m/d/Y').'" />
        </td>
        <td valign="top">
                        <p>'.label(t('Time')).timeselector().'
                        </p>
                        <p>
                            '.label(t('Location')).'
                            <input type="text" name="location" size="40" />
                            </p>
        </td>
        </tr>
        </table>
    </div>

';
return $output;
}

function hook_writestorypost(&$story) {
    global $client;

    $timeline = strtotime($_POST['date'].' '.$_POST['time']);
    $story['var1'] = $_POST['location'];
    $story['var2'] = $timeline;
    $uids[] = $client['id'];
    $text1 = serialize($uids);
    $story['text1'] = $text1;
}

function hook_viewstory($row) {
    button('events/joinit/'.$row['id'],t('I want join'));
    $output .='<p><strong>'.t('Joined members').':</strong><br />';
    $uids = unserialize($row['text1']);

    if (is_array($uids)) {
        foreach ($uids as $uid) {
            $res = sql_query("select username from `".tb()."accounts` where id='$uid'");
            $u = sql_fetch_array($res);
            $output .= url('u/'.$u['username'],$u['username']).' ';
        }
    }
    $output .= '</p>';
    $output .= '
            <p>
            <strong>'.t('Location').':</strong> '.$row['var1'].'
            </p>
            <p>
            <strong>'.t('Time').':</strong> '.get_date($row['var2']).'
            </p>
            ';
    return $output;
}

function joinit($sid) {
    global $client;
    $story = valid_story($sid);
    $uids = unserialize($story['text1']);
    if (is_array($uids)) {
        if (in_array($client['id'],$uids)) {
            sys_back(t('You have joined this event'));
        }
    }
    $uids[] = $client['id'];
    $text1 = serialize($uids);
    sql_query("update `".tb()."stories` set text1='$text1' where id={$story['id']}");
    redirect('events/viewstory/'.$story['id'],t('Opration success'));
}

function story_form_content($row = array()) {
    return '<p>'.label(t('Description')).'<textarea name="form_content" rows="3" >'.htmlspecialchars($row['content']).'</textarea></p>';
}

function ajax_form($page_type='') {
    global $client;
    if (!$client) die('login');
    if ($page_type == 'u' || $_REQUEST['page_type'] == 'u') {
        $privacy_form = privacy_form();
    }
    echo '
            <link href="[url]http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css"[/url] rel="stylesheet" type="text/css"/>
    <script src="[url]http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>[/url]
    <script>
    $(document).ready( function(){
        $("#datepicker").datepicker({
            onSelect: function(date, instance) {
                    $("#event_date").val(date);
            }
        });

    });

    </script>
    <div style="padding-left:20px">
        <table border="0"><tr><td width="235">
        <div type="text" id="datepicker"></div>
        <input type="hidden" name="date" id="event_date" value="'.date('m/d/Y').'" />
        </td>
        <td valign="top">
        <p>'.label(t('Event title')).'<input type="text" name="event_title" size="20" /></p>
        <p>'.label(t('Description')).'<textarea name="description" style="width:200px;height:50px"></textarea></p>
                        <p>'.label(t('Time')).timeselector().'
                        </p>
                        <p>
                            '.label(t('Location')).'
                            <input type="text" name="location" size="20" />
                            </p>
        </td>
        </tr>
        </table>
    </div>
    <div style="padding-right:25px;text-align:right">
    '.$privacy_form.'</div>';
    exit;
}

function ajax_post() {
    global $client;
    if (!$client) die('login');
    if (!$_POST['event_title']) events::ajax_error(t('Please input a Title'));
    $vote_options['rating'] = t('Rating');
    foreach ($vote_options as $key=>$vla) {
        $ratings[$key] = array('score'=>0,'users'=>0);
    }
    $page = story::check_page_access($_POST['page_id']);
    $story = array(
        'cid' => 0,
        'page_id' => $_POST['page_id'],
        'page_type'=>$page['type'],
        'title' => $_POST['event_title'],
        'content' => $_POST['description'],
        'uid' => $client['id'],
        'created' => time(),
        'app' => 'events',
        'var5' => $_POST['privacy'],
        'rating' => serialize($ratings)
        );
    $timeline = strtotime($_POST['date'].' '.$_POST['time']);
    $story['var1'] = $_POST['location'];
    $story['var2'] = $timeline;
    $uids[] = $client['id'];
    $text1 = serialize($uids);
    $story['text1'] = $text1;
    if (sql_insert($story, tb().'stories')) {
        $sid = $story['id'] = mysql_insert_id();
        save_tags($stags,$sid,'events');
        // write act
        $attachment = array(
            'cwall_id' => 'events'.$sid,
            'uri' => 'events/viewstory/'.$sid,
            'name' => $_POST['event_title']
            );
        $app = array('name'=>'events','id'=>$sid);
        $stream_id = stream_publish(t('started an event'),$attachment,$app);
        $set_story['id'] = $sid;
        $set_story['stream_id'] = $stream_id;
        sql_update($set_story,tb()."stories");
        echo t('Event Added!').' 
        <a href="'.url('events/viewstory/'.$sid).'"><strong>'.t('View').'</strong></a>';
    }
    else {
        events::ajax_error('failed to add event');

    }
    echo events::ajax_form();
    exit;
}

function ajax_error($msg) {
    echo '<div style="color:red">'.$msg.'</div>';
    echo events::ajax_form();
    exit;
}

}

n this is ..
no such script...

171 months ago
1 2 Next