Login     Sign up
Free template: Charcoal Theme
Ian (@eeji)
Join date: Aug 3rd 2010
Community posts: 107
View Profile
Send Message

Charcoal - A dark theme for Jcow

Download free from:
[url]http://community.jcow.net/directories/listing/8[/url]

Demo site:
[url]http://charcoal-demo.morrisbook.co.uk/[/url]

Screenshots:

[img]http://img265.imageshack.us/img265/8030/smallscreenie1.jpg[/img]

[img]http://img832.imageshack.us/img832/305/smallscreenie2.jpg[/img]

174 months ago
AL (@switch48)
Join date: Sep 1st 2010
Community posts: 450
View Profile
Send Message

WOW nice theme mate well done

174 months ago
arizon efendi (@arizon)
Join date: Aug 26th 2010
Community posts: 145
View Profile
Send Message

it is good themes. i'll try. thanks eeji.

174 months ago
Troy (@tdkrantz)
Join date: Sep 14th 2010
Community posts: 8
View Profile
Send Message

Sorry, it didn't work for me. Are there aditional parameters other than what was in the install.txt file?

174 months ago
Ian (@eeji)
Join date: Aug 3rd 2010
Community posts: 107
View Profile
Send Message

copy the unzipped charcoal directory into the themes directory on your server and you should be able to enable charcoal from the themes screen in your jcow admin panel

174 months ago
tommy (@tommy)
Join date: Aug 24th 2010
Community posts: 38
View Profile
Send Message

Very Nice!

Thanks for sharing!!

174 months ago
syed nayab (@syednayab)
Join date: Sep 17th 2010
Community posts: 23
View Profile
Send Message

i have been trying to install facebook and this theme ..but it shows broken image in the installation folder. do i have to upgrade it.. how can i fix this problem?

174 months ago
Ian (@eeji)
Join date: Aug 3rd 2010
Community posts: 107
View Profile
Send Message

All the images are in the zip file, but just in case theres been file corruption I've changed the download location so please try again.

174 months ago
Sim Ronca (@deltalab)
Join date: Sep 16th 2010
Community posts: 11
View Profile
Send Message

Congratulations!
Great Theme.
But i see there are not three interesting blocks in the welcome page:
Recent Logins
Network Statistics
Community activities

Is there anything to do to get them there?

Thanks in advance!!!

174 months ago
Jason Ward (@totalomega)
Join date: Sep 17th 2010
Community posts: 14
View Profile
Send Message

re: eeji:
Ok I finally got this extracted. here is what happened:

When I downloaded the theme via your link everything lookd fine until i went to open with winrar it said the file was corrupt.

So I redownlaoded it twice both time same issue. So I opened it with 7zip and it said the file type was Unix based so I extracted it to my desktop and renamed the extention to .rar .

Winrara then opened it and I saw files and was able to extract it to the desktop ok.....now lets see if I can install it hassle free.

174 months ago
Jason Ward (@totalomega)
Join date: Sep 17th 2010
Community posts: 14
View Profile
Send Message

Warning: include(themes/charcoal.1.0.0/application.tpl.php) [function.include]: failed to open stream: No such file or directory in /home/total555/public_html/CharlotteFL/includes/libs/ss.inc.php on line 459

Warning: include(themes/charcoal.1.0.0/application.tpl.php) [function.include]: failed to open stream: No such file or directory in /home/total555/public_html/CharlotteFL/includes/libs/ss.inc.php on line 459

Warning: include() [function.include]: Failed opening 'themes/charcoal.1.0.0/application.tpl.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/total555/public_html/CharlotteFL/includes/libs/ss.inc.php on line 459

Fatal error: Call to undefined function display_application() in /home/total555/public_html/CharlotteFL/includes/libs/ss.inc.php on line 471

here is the code from ss.inc.php :
[code]<?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.

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

session_start();
function newss() {
global $client, $config, $parr, $sid, $lang_options, $langs_enabled, $settings, $timezone;
if (!$_SESSION['uid'] && eregi("^[0-9a-z]+$",$_COOKIE['jcowss']) && is_numeric($_COOKIE['jcowuid']) ) {

    $res = sql_query("select id from ".tb()."accounts where id='{$_COOKIE['jcowuid']}' and jcowsess='{$_COOKIE['jcowss']}'");
    $row = sql_fetch_array($res);
    if ($row['id']) {
        $_SESSION['uid'] = $row['id'];
    }
    else {
        setcookie('jcowuid', '', time()+3600*24*365,"/");
        setcookie('jcowss', '', time()+3600*24*365,"/");
    }
}
if ($_SESSION['uid'] > 0) {
    $timeline = time();
    $res = sql_query("select * from ".tb()."accounts where id='{$_SESSION['uid']}' ");
    $client = sql_fetch_array($res);
    if ($client['id']) {
        set_client('uname',get_client('username'));
        if (!get_client('level')) {
            set_client('level',1);
        }
        if (!get_client('avatar')) {
            set_client('avatar','undefined.jpg');
        }
        if (get_client('roles')) {
            set_client('roles',explode('|',get_client('roles')));
        }
        $client['roles'][] = 2;
        sql_query("update ".tb()."accounts set lastlogin=$timeline,token='' where id='{$client['id']}'  ");
    }
}
if ($client['id']) {
    $client['settings'] = unserialize($client['settings']);
    $_SESSION['username'] = $client['username'];
    if ($parr[0] != 'account') { 
        for($i=1;$i<=7;$i++) {
            $col = 'var'.$i;
            $key5 = 'cf_var_required'.$i;
            $required = get_gvar($key5);
            if ($required) {
                if (!strlen($client[$col])) {
                    redirect('account/index/1');
                }
            }
        }
    }
    if($client['disabled'] == 1 && get_gvar('pm_enabled') && $parr[0] != 'account' && $parr[0] != 'member' && $parr[0] != 'language' && $parr[0] != 'paidmember') {
        redirect('paidmember/basic_membership');
    }
}

if (!get_client('id') && eregi("^[0-9a-z]+$",$jt)) {
    try_token($jt);
}

$client['ip'] = ip();
if (!is_array($client['roles']))
    $client['roles'] = array();
$client['roles'][] = 1;

if ($clang = $_COOKIE[$sid.'lang']) {
    if ($lang_options[$clang]) {
        $client['lang'] = $clang;
    }
}
if (!$client['lang']) {
    $key = $settings['default_lang'];
    if ($lang_options[$key]) {
        $client['lang'] = $key;
    }
}
if (!$client['lang']) {
    if (count($langs_enabled)>0) {
        $client['lang'] = $langs_enabled[0];
    }
    else {
        $client['lang'] = 'en';
    }
}
if (!strlen($timezone))
    $timezone = -8;
$ctimezone = $_COOKIE['timezone'];
if (is_numeric($ctimezone)) {
    $client['timezone'] = $ctimezone;
}
else {
    $client['timezone'] = $timezone;
}

}
newss();
foreach ($_POST as $key=>$val) {
if(!is_array($val)) {
if (get_magic_quotes_gpc())
$_POST[$key] = trim($val);
else
$_POST[$key] = addslashes(trim($val));
}
}
$jeval = 'j'.'e';
if ($parr[0] == 'streampublish') {
if (!$client['id']) die('please login first');
$app = $_POST['attachment'];
if (strlen($app) && $app != 'status') {
include_once('modules/'.$app.'/'.$app.'.php');
$c_run = $app.'::ajax_post();';
eval($c_run);
exit;
}
else {
if (strlen($_POST['message'])<4) die('failed! message too short');
$_POST['message'] = utf8_substr($_POST['message'],200);
$_POST['message'] = parseurl($_POST['message']);
$url_search = array(
"/[url]www.([^'\"])[\/url]/iU",
"/[url]([^'\"]
)[\/url]/iU",
"/[url=www.([^'\"\s])](.)[\/url]/iU",
"/[url=([^'\"\s])](.)[\/url]/iU",
);
$url_replace = array(
"<a href=\"[url]http://www.\\1\"[/url] target=\"_blank\" rel=\"nofollow\">www.\1</a>",
"<a href=\"\1\" target=\"_blank\" rel=\"nofollow\">\1</a>",
"<a href=\"[url]http://www.\\1\"[/url] target=\"_blank\" rel=\"nofollow\">\2</a>",
"<a href=\"\1\" target=\"_blank\" rel=\"nofollow\">\2</a>"
);
$stream_id = stream_publish(preg_replace($url_search,$url_replace, h($_POST['message']) ),$attachment,$app);
$arr = array(
'id'=>$stream_id,'avatar'=>$client['avatar'],'message'=>decode_bb(h(stripslashes($_POST['message']))),'attachment'=>$attachment,'username'=>$client['uname'],'created'=>time()
);
echo stream_display($arr,'',1);
ss_update();
}
exit();
}

function try_token($token) {
global $client;
$timeline = time() - 3600;
$res = sql_query("select * from ".tb()."accounts where token='{$token}' "." limit 1");
$client = sql_fetch_array($res);
if (get_client('id')) {
set_client('uname',get_client('username'));
if (get_client('roles')) {
set_client('roles',explode('|',get_client('roles')));
}
$client['roles'][] = 2;
$newss = get_rand(12);
$setss = " ,ipaddress='{$client['ip']}',jcowsess='$newss' ";
$_SESSION['uid'] = get_client('id');
}
else {

}

}
function ss_update() {
return true;
}

function c($val = '') {
section_content($val);
}

function get_client($key) {
global $client;
return $client[$key];
}
function set_client($key, $value) {
global $client;
$client[$key] = $value;
}

function jcow_attribution($type=1) {
$logo = 'poweredby.gif';
return '
<a class="jcow_attribute" href="[url]http://www.jcow.net"[/url] title="Create a social network/online community"><img src="'.uhome().'/files/'.$logo.'" title="Jcow social networking software" /></a>';
}

function is_ce() {
global $is_community_edition;
return $is_community_edition;
}
function load_tpl() {
global $title,
$content,
$apps,
$client,
$current_app,
$lang_options,
$time_start,
$uhome,
$config,
$sub_menu,
$tab_menu,
$buttons,
$current_sub_menu,
$ubase,
$auto_redirect,
$sub_menu_title,
$blocks,
$page_title,
$page,
$gvars,
$ass,
$nav,
$clear_as,
$sub_title,
$top_title,
$commercial,
$defined_jq,
$styles,
$custom_css,
$profile_css,
$theme_css,
$optional_apps,
$parr,
$content,
$sections,
$app_header,
$menu_items,
$jcow_app_content,
$community_menu,
$current_menu_path,
$top_menu_path,
$jcow_tmp_content,
$personal_menu,
$pbja,
$app_content,
$application,
$page_cache,
$enable_page_cache,
$section_content,
$notices;
if ($_GET['succ']) {
sys_notice(t('Opration success'));
}

// hooks
$hooks = check_hooks('footer');
if ($hooks) {
foreach ($hooks as $hook) {
$hook_func = $hook.'_footer';
$footer .= $hook_func();
}
}
$hooks = check_hooks('header');
if ($hooks) {
foreach ($hooks as $hook) {
$hook_func = $hook.'_header';
$header .= $hook_func();
}
}

// auto close section
if (strlen($section_content)) {
    $plain_content = $section_content;
}
if ($parr[0] == 'jquery' || $parr[0] == 'jcow') {
    die('not allowed');
}
if ($clear_as) {
    $blocks = '';
    $sub_menu = '';
}
if (!$sub_menu_title) {
    $sub_menu_title = t('Menu');
}
if (!$auto_redirect) {
    $auto_redirect = '<meta name="Generator" content="Jcow Social Networking Software. '.jversion().'" />';
}
else {
    $on_redirect = 1;
}

if (!$theme_tpl = get_gvar('theme_tpl') )
        $theme_tpl = 'default';
if ($_SESSION['defined_theme'])
    $theme_tpl = $_SESSION['defined_theme'];

/* ################################# get tpl vars ################################# */
if (is_array($lang_options) && count($lang_options) > 1) {
    $tpl_vars['language_selection'] = t('Language').':<select style="font-size:10px" name="clang"  onChange="location=options[selectedIndex].value;">';

    foreach ($lang_options as $key=>$lang) {
        $url = url('language/post/'.$key);
        if ($client['lang'] == $key) { 
            $lselected = 'selected';
        } 
        else { 
            $lselected = '';
        }
        $tpl_vars['language_selection'] .= '<option value="'.$url.'" '.$lselected.'>'.$lang.'</option>';
    } 
    $tpl_vars['language_selection'] .= '</select>';
}
$tpl_vars['language_options'] = '';
if ($client['id']) {
    $tpl_vars['username'] = url('u/'.$client['username'],$client['username']);
    $tpl_vars['log_in_out'] = url('logout',t('Logout') );
}
else {
    $tpl_vars['username'] = t('Guest');
    $tpl_vars['log_in_out'] = url('member/login',t('Login/ SignUp') );
}
if(!$friendslink = frd_request())
            $friendslink = url('friends',t('Friends'));

$menu = add_links($menu);
if (allow_access(3)) {
    $personal_menu[] = array(
        'name'=>'Admin CP',
        'path'=>'admin',
        'app'=>'admin',
        'actived'=>1,
        'type'=>'personal',
        'icon'=>'files/appicons/admin.png'
    );
}

$tpl_vars['menu'] = '';
$tpl_vars['footer'] = get_text('footermsg');

// jcow_app

        $tpl_vars['custom_profile_css'] = '';
        if ($profile_css['wallpaper']) {
                if ($profile_css['wallpaper_bg_image']) {
                    if (!$profile_css['wallpaper_repeat_x'] && !$profile_css['wallpaper_repeat_y']) {
                        $no_repeat = 'no-repeat';
                    }
                    if ($profile_css['wallpaper_repeat_x']) {
                        $repeat_x = 'repeat-x';
                    }
                    if ($profile_css['wallpaper_repeat_y']) {
                        $repeat_y = 'repeat-y';
                    }
                    if ($profile_css['wallpaper_bg_position'] == 'left') {
                        $position = 'left';
                    }
                    elseif ($profile_css['wallpaper_bg_position'] == 'right') {
                        $position = 'right';
                    }
                    else {
                        $position = 'center';
                    }
                    $tpl_vars['custom_profile_css'] = '<style>
                    #wallpaper {
                        background: url("'.uhome().'/'.$profile_css['wallpaper_bg_image'].'");
                        background-position: '.$position.' top;
                        background-repeat: '.$no_repeat.' '.$repeat_x.' '.$repeat_y.';
                        }
                        </style>
                        ';
                }
                $tpl_vars['custom_profile_css'] .= '<style>
                #wallpaper {
                    background-color:#'.$profile_css['wallpaper_bg_color'].';
                }
                </style>';
            }
    if ($profile_css['generalpage']) {
                if ($profile_css['generalpage_transparent']) $profile_css['generalpage_bg_color'] = 'none';
                else $profile_css['generalpage_bg_color'] = '#'.$profile_css['generalpage_bg_color'];
                $tpl_vars['custom_profile_css'] .='<style>
                #jcow_main_box {
                    background: '.$profile_css['generalpage_bg_color'].';
                    border: none;
                }
                #jcow_main_box {
                    color: #'.$profile_css['generalpage_font_color'].';
                }
                #jcow_main_box a, #jcow_main_box a:visited {
                    color: #'.$profile_css['generalpage_link_color'].';
                }
                #sidebar {
                    border: none;
                }
                </style>';
            }

    if ($profile_css['bheader']) {
                $tpl_vars['custom_profile_css'] .='<style>
                #appside .block_title, #appcenter .block_title {
                    border: none;
                    background: #'.$profile_css['bheader_bg_color'].';
                    color: #'.$profile_css['bheader_font_color'].';
                }
                #appside .block_title a, #appcenter  .block_title a:visited {
                    color: #'.$profile_css['bheader_font_color'].';
                }
                </style>';
            }
$tpl_vars['javascripts'] = '
<base href="'.uhome().'/" />
<script type="text/javascript" src="'.uhome().'/js/common.js"></script>

<script type="text/javascript" src="'.uhome().'/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="'.uhome().'/js/jquery.form.js"></script>
<link href="'.uhome().'/js/lightbox/css/jquery.lightbox-0.5.css" media="screen" rel="stylesheet" type="text/css" />
<script src="'.uhome().'/js/lightbox/js/jquery.lightbox-0.5.js" type="text/javascript"></script>
<script>
$(document).ready( function(){
$("input[class=button]").attr(\'disabled\',\'\');
$("input[class=button]").click( function () {
$(this).attr(\'disabled\',\'disabled\');
$(this).attr(\'value\',\'Submitting\');
$(this).after(\'<img src="'.uhome().'/files/loading.gif" />\');
$(this).parents("form").submit();
return false;
});
$(".menu li.menugen").mouseover(function() {
$(this).removeClass("menugen");
$(this).addClass("menuhover");
});
$(".menu li.menugen").mouseout(function() {
$(this).removeClass("menuhover");
$(this).addClass("menugen");
});
$(\'a[rel*=lightbox]\').lightBox() ;

        });
    </script>';
$tpl_file = 'themes/'.$theme_tpl.'/page.tpl.php';
$application_file = 'themes/'.$theme_tpl.'/application.tpl.php';

if (is_array($menu_items[$current_menu_path]) || $application == 'home') {
    $is_cover = 1;
}
if (!$app_content) {
    $app_content = '<div id="jcow_app_container">
    <div style="min-height: 400px;">';
    include $application_file;
    $data['nav'] = $nav;
    $data['notices'] = $notices;
    $data['application'] = $application;
    $data['top_title'] = $top_title;
    $data['sections'] = $sections;
    $data['blocks'] = $blocks;
    $data['buttons'] = $buttons;
    $data['tab_menu'] = $tab_menu;
    $data['app_header'] = $app_header;
    $data['app_footer'] = $plain_content;
    $data['is_cover'] = $is_cover;
    $app_content .= display_application($data);
    if ($config['enreport']) {
        if ($client['id']) {
            $report_link = url('report');
            $report_title = 'title="'.t('Report spam, advertising, and problematic.').'"';
        }
        else {
            $report_link = url('member/login/1');
        }
        $report_link = '<a href="'.$report_link.'" '.$report_title.'><img src="'.uhome().'/themes/default/report.gif" /> Report this page</a>';
    }
    $app_content .= '<div style="width:760px;text-align:right;clear:both;">'.$report_link.'</div>';

    $app_content .= '
    </div><!-- end of content-->
    '.$app_footer.'
    </div><!-- end of jcow_app_container -->';
}

if ($enable_page_cache) {
    if ($page_content = get_cache($page_cache['key'])) {
        echo $page_content;
        exit();
    }
}
include $tpl_file;
exit;

}

function display_application_content() {
global $app_content;
echo $app_content;
}
/ stream /
if ($parr[0] == 'demotheme' && strlen($parr[1])) {
$defined_theme = $parr[1];
if (is_dir('themes/'.$defined_theme)) {
$_SESSION['defined_theme'] = $defined_theme;
}
header("Location:".uhome());
exit;
}

if ($parr[0] == 'jcow_version') {
set_title('Your Jcow version');
c('Your Jcow version is:<br />
<strong>'.$version.'</strong>');
stop_here();
}

function stream_publish($message, $attachment = '', $app = '', $uid = 0) {
global $client;
if (!$client['id'] && !$uid) return false;
if (!$uid) $uid = $client['id'];
if (is_array($app)) {
$stream['app'] = $app['name'];
$stream['aid'] = $app['id'];
}
$stream['uid'] = $uid;
$stream['message'] = $message;
$stream['created'] = time();
if (is_array($attachment)) {
$stream['attachment'] = serialize($attachment);
}
sql_insert($stream,tb()."streams");
return insert_id();
}

function stream_update($message, $attachment = '', $app = '', $id) {
global $client;
if (!$client['id']) return false;
if (is_array($app)) {
$stream['app'] = $app['name'];
$stream['aid'] = $app['id'];
}
$stream['id'] = $id;
$stream['uid'] = $client['id'];
$stream['message'] = $message;
$stream['created'] = time();
if (is_array($attachment)) {
$stream['attachment'] = serialize($attachment);
}
sql_update($stream,tb()."streams", $id);
return true;
}

function stream_get($uid,$num = 12,$offset=0) {
$res = sql_query("select s.,u.username,u.avatar from ".tb()."streams as s left join ".tb()."accounts as u on u.id=s.uid where s.uid='{$uid}' and s.hide!=1 ".dbhold('s')." order by id desc limit $offset,$num");
while($row = sql_fetch_array($res)) {
$row['attachment'] = unserialize($row['attachment']);
$output .= stream_display($row);
}
return $output;
}
function stop_here($key = 0) {
load_tpl();
}
function jcookie($key, $value) {
setcookie($key, $value, time()+3600
48,"/");
}

/ comment /

function comment_publish($stream_id, $message) {
global $client;
$comment['stream_id'] = $stream_id;
$comment['uid'] = $client['id'];
$comment['message'] = $message;
$comment['created'] = time();
$res = sql_query("select s.id,s.uid,u.username from ".tb()."streams as s left join ".tb()."accounts as u on u.id=s.uid where s.id='$stream_id'");
$stream = sql_fetch_array($res);
if ($stream['uid']) {
sql_insert($comment,tb()."comments");
$msg = t('{1} commented on your stream',name2profile($client['username'])).': '.url('u/'.$stream['username'].'/status/'.$stream['id'],h(utf8_substr($message,50)) );
send_note($stream['uid'],$msg);

    mail_notice('stream_comment',
        $stream['username'],
        t('{1} commented on your stream',name2profile($client['username'])),
        $msg );
    return insert_id();
}
else {
    return 0;
}

}

function comment_get($target_id,$num = 12) {
if ($target_id > 0) {
$res = sql_query("select c.*,u.username,u.avatar from ".tb()."comments as c left join ".tb()."accounts as u on u.id=c.uid where c.stream_id='{$target_id}' order by id desc limit $num");
while($row = sql_fetch_array($res)) {
$comments .= comment_display($row);
}
return $comments;
}
}

function comment_display($row = array()) {
if (!$row['avatar']) {
$res = sql_query("select avatar from ".tb()."accounts where id='{$row['uid']}'");
$row2 = sql_fetch_array($res);
if (!$row2['avatar'])
$row['avatar'] = 'undefined.jpg';
else
$row['avatar'] = $row2['avatar'];
};
return '
<div class="user_comment">
<table width="100%">
<tr>
<td class="user_post_left" width="40" valign="top">'.avatar($row,25).'</td>
<td class="user_post_right" valign="top">
<strong>'.url('u/'.$row['username'], $row['username']).'</strong>
'.h($row['message']).'
<div class="att_bottom">'.get_date($row['created']).'</div></td>
</tr>
</table>
</div>
';
}

/ ################################ profile comment /

function profile_comment_publish($target_id, $message) {
global $client;
$comment['target_id'] = $target_id;
$comment['uid'] = $client['id'];
$comment['message'] = $message;
$comment['created'] = time();
sql_insert($comment,tb()."profile_comments");
return insert_id();
}

function profile_comment_get($target_id,$num = 12, $offset = 0) {
$res = sql_query("select c.*,u.username,u.avatar from ".tb()."profile_comments as c left join ".tb()."accounts as u on u.id=c.uid where c.target_id='{$target_id}' ".dbhold('c')." order by id desc limit $offset,$num");
while($row = sql_fetch_array($res)) {
$comments .= profile_comment_display($row);
}
return $comments;
}

function profile_comment_display($row = array(), $hide_form = 0) {
global $client;
if (!$row['avatar']) {
$res = sql_query("select avatar from ".tb()."accounts where id='{$row['uid']}'");
$row2 = sql_fetch_array($res);
if (!$row2['avatar'])
$row['avatar'] = 'undefined.jpg';
else
$row['avatar'] = $row2['avatar'];
};
$row['cwall_id'] = 'comment'.$row['id'];
if ($client['id'] && !$client['no_comment'] && !$hide_form && $row['stream_id']) {
$comment_form = comment_form($row['stream_id'],t('Reply'));
}
return '
<div class="user_post_1">
<table width="100%">
<tr>
<td class="user_post_left" width="60" valign="top">'.avatar($row).'</td>
<td class="user_post_right" valign="top">
<strong>'.url('u/'.$row['username'], $row['username']).'</strong>
'.decode_bb(h($row['message'])).
$comment_form.comment_get($row['cwall_id'],5).'
<div class="att_bottom">'.get_date($row['created']).'</div></td>
</tr>
</table>
</div>
';
}

function privacy_access($ptype, $owner = 0) {
global $client;
if (!$ptype) {
return true;
}
elseif (!$client['id']) {
return false;
}
if (!$owner) {
return false;
}
if ($owner == $client['id']) {
return true;
}
if ($ptype == 2) {
$res = sql_query("select from ".tb()."friends where uid='{$client['id']}' and fid='{$owner}' limit 1");
if (sql_counts($res)) {
return true;
}
else {
return false;
}
}
if ($ptype == 1) {
$res = sql_query("select fid from ".tb()."friends where uid='{$client['id']}'");
while ($row = sql_fetch_array($res)) {
$uids[] = $row['fid'];
}
if (!count($uids)) {
return false;
}
if (in_array($owner, $uids)) {
return true;
}
$uids = implode(',',$uids);
$res = sql_query("select
from ".tb()."friends where uid='{$owner}' and fid in ({$uids}) limit 1");
if (sql_counts($res)) {
return true;
}
else {
return false;
}

}

}

function privacy_form($row = array()) {
if ($row['var5'] == 2) {
$selected2 = 'selected';
}
elseif ($row['var5'] == 1) {
$selected1 = 'selected';
}
else {
$selected0 = 'selected';
}
return '
<span class="sub">'.t('Privacy').':</span>
<select name="privacy" style="font-size:11px">
<option value="0" '.$selected0.'>'.t('Everyone').'</option>
<option value="1" '.$selected1.'>'.t('Friends of friends').'</option>
<option value="2" '.$selected2.'>'.t('Friends only').'</option>
</select>';
}

function allow_access($roleids, $force_uid = 0) {
global $client;
if (is_array($client['roles']) && in_array('3',$client['roles']))
return true;
if ($force_uid) {
if (!$client['id'] or $force_uid != $client['id'])
return false;
}
if (is_array($roleids)) {
foreach ($roleids as $roleid) {
if (in_array($roleid,$client['roles']))
return true;
}
}
else {
if (is_array($client['roles']) && in_array($roleids, $client['roles']))
return true;
}
return false;
}
?>
[/code]

what do i need to do?

174 months ago
Jason Ward (@totalomega)
Join date: Sep 17th 2010
Community posts: 14
View Profile
Send Message

Ok so I just deleted and reinstalled the whole solution and gave up on this theme since i got sick of looking at a downed site.

174 months ago
1 2 Next