Show some text only to guest

Started by peppe, January 28, 2015, 01:44:05 PM

Previous topic - Next topic

peppe

Hi.

I want to ask you what is PHP code to show a text only to guest


Please write me all text (I don't know php code) and then I will can do copy and paste


Thanks to all
Tutte le news sulla laurea in giurisprudenza e su esame da avvocato

austin.bollinger

#1
Quote from: peppe on January 28, 2015, 01:44:05 PM
Hi.

I want to ask you what is PHP code to show a text only to guest


Please write me all text (I don't know php code) and then I will can do copy and paste


Thanks to all

Because all of the PHP kids aren't here, I will help you.

<?php
if ($context['user']['is_guest'])
{
echo 
'meow';
}
?>


This will show meow to guests.

Make sure that SSI.php is included though. So if you are using script outside of your forum script stuff you will need to do like this:

<?php
require_once('/forum/SSI.php');
if (
$context['user']['is_guest'])
{
echo 
'meow';
}
?>


Make sure you aren't doing anything stupid like

<?php
<?php
<?php
<?php
<?php

because.. I don't think it works like this. I'm kind of tipsy mate, but if you're pasting php inside of <?php, you don't need the <?php so just liek this:


require_once('/forum/SSI.php');
if ($context['user']['is_guest'])
{
echo 'meow';
}


instead.. hope this makes sense.....
MAKE SUREEEEEEEEEEEEE!!!
That require_once('/forum/SSI.php'); is pointing to valid directory. If the PHP file is inside of the location that SSI.php is in, then you could just do require_once('SSI.php'); --- I think. If the SSI.php is in "peanut" folder, then require_once('/peanut/SSI.php');

Kindred

well... you may have to include SSI.php and globalize $context, depending on where you plan to use that code....

So, the code as provided is not actually "paste-able"


Some specifics on what exactly you are trying to do would help us help you better....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

peppe

I've done some test but I can't :(


If I post all my index.template file (of a mobile theme) and tell you where I want put the text for guests, can you put the right code in right position?
Tutte le news sulla laurea in giurisprudenza e su esame da avvocato

austin.bollinger

Quote from: peppe on January 28, 2015, 02:14:59 PM
I've done some test but I can't :(


If I post all my index.template file (of a mobile theme) and tell you where I want put the text for guests, can you put the right code in right position?

Dude, you are killing me. Just give me root access to your box. I am joking.. do you have TeamViewer? If not, can you go get it?
http://www.teamviewer.com/en/index.aspx [nofollow]

I will help you, go get TeamViewer. Then when you start TeamViewer, PRIVATE MESSAGE (http://www.simplemachines.org/community/index.php?action=pm;sa=send;u=412846) me your TeamViewer ID and pass. I will remotely guide you through setting it up or I will do it for you.

peppe

Ok I'm downloading it.... and after??
Tutte le news sulla laurea in giurisprudenza e su esame da avvocato

austin.bollinger

Quote from: peppe on January 28, 2015, 02:18:46 PM
Ok I'm downloading it.... and after??

After you have TeamViewer, http://www.simplemachines.org/community/index.php?action=pm;sa=send;u=412846 <---



^ Send me that stuff in the red boxes and I will help you out.

margarett

Not saying that you should or shouldn't do it. Just remember that you will be granting someone access to YOUR COMPUTER.
This --> http://www.simplemachines.org/community/index.php?topic=228940.0 applies

@austin: nothing personal. But it's a fair warning from us...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

austin.bollinger

Marg ='/ warning for what..? For offering to help with Team Viewer?

margarett

Not a warning to you :P
I meant I'm warning the user to be careful when he decides to grant someone access to his computer ;)
I'm not saying you have bad intentions, but the fact is that none of us knows you so. Again, nothing personal (far from it) but it's the "online reality"...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

austin.bollinger

Oh, I understand.. yeah I fully understand. I wouldn't do anything to him malicious. I am a nice/helpful guy. Hopefully he figures out the installer --- I'm just waiting for TeamViewer credentials to assist him.

Kindred

However...   if he would actually TELL us specifically what he is trying to do, we could help him LEARN how to do it (and thus be able to do it in the future)

We actually DISCOURAGE the use of things like teamviewer and other stuff off-site, since there is no record for any future questions and it doesn't actually HELP anyone who is searching for a similar question in the future.

This is why we are constantly asking for DETAILS when a user makes a request like this.

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

austin.bollinger

Quote from: Kindred on January 28, 2015, 02:45:32 PM
However...   if he would actually TELL us specifically what he is trying to do, we could help him LEARN how to do it (and thus be able to do it in the future)

We actually DISCOURAGE the use of things like teamviewer and other stuff off-site, since there is no record for any future questions and it doesn't actually HELP anyone who is searching for a similar question in the future.

This is why we are constantly asking for DETAILS when a user makes a request like this.

I fully agree Kindred, I am going to document everything that I do or show him for that reason --- I will post it here in a response to allow others to know what I did.

peppe

This is my file to modify

<?php
// Version: 2.0 RC5; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

/**
 * Quick function to compress CSS
 *
 * @param string $css
 * @return string
 */
function compress_css($css)
{
return 
str_replace('; '';'
str_replace(' }' ,'}'
str_replace('{ ''{',
str_replace(array("\r\n""\r""\n""\t"'  ''    ''    '), ""
preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!'''$css)
)
)
)
 );
}

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt$modSettings$user_info;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '2.0';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as opposed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status separate from topic icons? */
$settings['separate_sticky_lock'] = true;

/* Does this theme use the strict doctype? */
$settings['strict_doctype'] = false;

/* Does this theme use post previews on the message index? */
$settings['message_index_preview'] = false;

/* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
$settings['require_theme_strings'] = true;

loadLanguage('ThemeStrings');

$context['smf4mobile_version'] = '1.1.5';
$settings['use_image_buttons'] = false;
$modSettings['compactTopicPagesEnable'] = false;

// Portal disabling mafia
// SimplePortal
$settings['disable_sp'] = true;

// PortaMx
$_SESSION['pmx_paneloff'] = array('head''top''left''right''bottom''foot''front''pages' => 'Pages');
$modSettings['pmx_paneloff'] = 'head,top,left,right,bottom,foot,front,pages';

// We'll be using this array a lot later
$context['footer_controls'] = array();

// Disable the Ad. management mod
$modSettings['ads_quickDisable'] = true;

// Whether to use native menu or not(never)
$context['use_native_menu'] = 'false';

// JS Lib compression, reduces to about 2/3rd the size
$script_path $settings['actual_theme_dir'] . '/scripts/';
$js_files = array('jquery.js''script.js''jquery.mobile.js');
$filemtime file_exists($script_path 'compiled.js') ? filemtime($script_path 'compiled.js') : 0;
$recompile false;
foreach ($js_files as $j)
if (filemtime($script_path $j) > $filemtime)
$recompile true;

if ($recompile)
{
require_once($settings['actual_theme_dir'] . '/libs/jsmin.php');

@unlink($script_path 'compiled.js');
$js '';
foreach ($js_files as $j)
$js .= "\n" file_get_contents($script_path $j);
$js JSMin::minify($js);

file_put_contents($script_path 'compiled.js'$js);
}

// Compress and combine CSS as well
$css_path $settings['actual_theme_dir'] . '/css';
$css_files = array('jquery.mobile.structure' . (!empty($txt['lang_rtl']) ? '.rtl' '') . '.css''jquery.mobile.theme.css''style.css');
$filemtime file_exists($css_path '/compiled.css') ? filemtime($css_path '/compiled.css') : 0;
$recompile false;

foreach ($css_files as $file)
if (filemtime($css_path '/' $file) > $filemtime)
$recompile true;

if ($recompile)
{
$css_content '';
foreach ($css_files as $file)
$css_content .= file_get_contents($css_path '/' $file);

file_put_contents($css_path '/compiled.css'compress_css($css_content));
}

$context['script_version'] = $context['smf4mobile_version'] . '_' filemtime($script_path 'compiled.js');
$context['css_version'] = $context['smf4mobile_version'] . '_' filemtime($css_path '/compiled.css');

// We shorten the time_format too fit better in our shorter space
$modSettings['todayMod'] = 0//!!! Is this a good idea?
$user_info['time_format'] = '%d %b, %Y %H:%M';
}

// The main sub template above the content.
function template_html_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Disable TinyPortal as well
if (function_exists('tp_hidebars'))
tp_hidebars();

// Absolutely shameful plug
if (isset($txt['set_parameters']) && $context['page_title'] == $txt['set_parameters'])
$context['page_title'] = $context['page_title_html_safe'] = $txt['_set_parameters'];

echo '<!DOCTYPE html>
<html>
<!--
SMF4Mobile '
$context['smf4mobile_version'], ' copyright SMF-Media.com
-->
<head>'
;
// Here comes the JavaScript bits!
echo '
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<script type="text/javascript" src="'
$settings['theme_url'], '/scripts/compiled.js?version='$context['script_version'], '"></script>
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/css/compiled.css?version='$context['css_version'], '" />
<script type="text/javascript"><!-- // --><![CDATA[
var a = navigator.userAgent.toLowerCase();
var is_ios = a.indexOf("iphone") != -1 || a.indexOf("ipod") != -1 || a.indexOf("ipad") != -1;
var is_android = a.indexOf("android") != -1;

if (is_ios)
$.mobile.defaultTransition = "slide";
else
$.mobile.defaultTransition = "none";

$.mobile.ajaxEnabled = false;
// ]]></script>'
;

echo '
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title_html_safe'], '" />', !empty($context['meta_keywords']) ? '
<meta name="keywords" content="' 
$context['meta_keywords'] . '" />' '''
<title>'
$context['page_title_html_safe'], '</title>';

// Please don't index these Mr Robot.
if (!empty($context['robot_no_index']))
echo '
<meta name="robots" content="noindex" />'
;

// Present a canonical url for search engines to prevent duplicate content in their indices.
if (!empty($context['canonical_url']))
echo '
<link rel="canonical" href="'
$context['canonical_url'], '" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" />
<link rel="search" href="'
$scripturl'?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name_html_safe'], ' - '$txt['rss'], '" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="'
$scripturl'?board='$context['current_board'], '.0" />';

echo '

<script>
  (function(i,s,o,g,r,a,m){i[\'GoogleAnalyticsObject\']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,\'script\',\'//www.google-analytics.com/analytics.js\',\'ga\');

  ga(\'create\', \'UA-58848312-1\', \'auto\');
  ga(\'send\', \'pageview\');

</script>

</head>
<body>'
;
}

function 
template_body_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// The "up one level" URL for PM and profile are actually two levels up
echo '
<div data-role="page" data-theme="b" id="jqm">
<div data-role="header" data-theme="b" data-backbtn="false">
<div align="center"><a href="http://www.calciocataniaforum.it"><img border="0" src="http://www.calciocataniaforum.it/images/logo-mobile.png" /></a></div>'
count($context['linktree']) > '
<a href="' 
$context['linktree'][count($context['linktree']) - (in_array($context['current_action'], array('pm''profile')) ? 2)]['url'] . '" data-icon="arrow-u" data-direction="reverse" class="ui-btn-left" data-iconpos="notext">' $txt['back'] . '</a>' '''
</div><br />

'
;

// The main content should go here.
echo '
<div data-role="content">'
;
}

function 
template_menu()
{
global $context;

echo '
<div data-role="navbar">
<ul>'
;

// This is a hardcoded list of buttons that can be shown
// The reason they are hardcoded is so that we do not show menu items that are not in the reach of this theme
$button_list = array('forum''search''login''register''logout''pm''media');
foreach ($context['menu_buttons'] as $id => $button)
if (in_array($id$button_list))
echo '
<li><a href="'
$button['href'], '"'$button['active_button'] ? ' class="ui-btn-active"' '''>'$button['title'], '</a></li>';
echo '
</ul>
</div>'
;
}

function 
template_body_below()
{
global $context$settings$options$scripturl$txt$modSettings$user_info;

echo '
</div>'
;

// God darn page index!
if (isset($context['page_index']) || isset($context['aeva_page_index']))
echo '
<div class="ui-bar ui-bar-c pageindex">
<strong>'
$txt['goto_page'], '</strong>:
<div class="pagenav">
'
str_replace(array('['']'), '', !empty($context['page_index']) ? $context['page_index'] : $context['aeva_page_index']), '
</div>
</div>'
;

if (!$user_info['is_guest'] && $context['user']['unread_messages'] > 0)
$txt['personal_messages'] = $txt['personal_messages'] . ' [' $context['user']['unread_messages'] . ']';

// Append the common controls into the navigation
$buttons = array(
'home' => array('icon' => 'home''url' => $scripturl'text' => 'home'),
);
if (!$context['user']['is_logged'])
$buttons += array(
'login' => array('icon' => 'arrow-r''url' => $scripturl '?action=login''text' => 'login'),
'register' => array('icon' => 'arrow-r''url' => $scripturl '?action=register''text' => 'register'),
);
else
$buttons += array(
'pm' => array('icon' => 'star''url' => $scripturl '?action=pm''text' => 'personal_messages'),
'unread' => array('icon' => 'arrow-r''url' => $scripturl '?action=unread''text' => 'view_unread_category'),
'unreadreplies' => array('icon' => 'arrow-r''url' => $scripturl '?action=unreadreplies''text' => 'unread_replies'),
'profile' => array('icon' => 'arrow-r''url' => $scripturl '?action=profile''text' => 'profile'),
'logout' => array('icon' => 'arrow-l''url' => $scripturl '?action=logout;' $context['session_var'] . '=' $context['session_id'], 'text' => 'logout'),
);
if ($context['allow_moderation_center'])
$buttons += array(
'moderate' => array('icon' => 'star''url' => $scripturl '?action=moderate''text' => 'moderate'),
);
$buttons += array(
'search' => array('icon' => 'search''url' => $scripturl '?action=search''text' => 'search'),
'recent' => array('icon' => 'arrow-r''url' => $scripturl '?action=recent''text' => 'recent_posts'),
);
if (allowedTo('aeva_access') && !empty($txt['aeva_gallery']))
$buttons['media'] = array(
'icon' => 'grid''url' => $scripturl '?action=media''text' => 'aeva_gallery',
);

template_button_strip($buttons'common_actions'$txt['common_actions'], true);

echo '
<div data-role="footer" data-theme="b"><div class="ui-bar">'
;
echo '
<div style="height: 20px; position: relative; top: -18px; display: inline; float:left; width: 30%;">
<select name="page_menu" data-icon="grid" data-iconpos="notext" data-select-menu="true">
<option data-theme="a">'
$txt['navigation'], '</option>';
foreach ($context['footer_controls'] as $control_group)
{
if (empty($control_group['buttons']))
continue;

echo '
<optgroup label="'
$control_group['label'], '">';
foreach ($control_group['buttons'] as $control_button)
echo '
<option data-theme="c" data-icon="'
$control_button['icon'], '" value="'$control_button['url'], '"', !empty($control_button['confirm']) ? ' class="confirm" title="' $control_button['confirm'] . '"' '''>
'
$control_button['text'], '
</option>'
;
echo '
</optgroup>'
;
}
echo '
</select>
</div>'
;

echo '
<div style="float: right; width:65%; text-align: right;" class="smalltext">
'
$context['user']['is_logged'] ? sprintf($txt['logged_in_as'], $context['user']['name']) : $txt['not_logged_in'], '
</div>
</div></div>'
;

echo '

<div id="footer_copyright">
'
, !empty($context['aeva_copyright']) ? aeva_copyright() . '<br />''''
<a href="'
$scripturl'?thememode=full;redirect='urlencode(str_replace('thememode=mobile'''$_SERVER['REQUEST_URL'])), '" data-role="button" data-inline="true" data-icon="forward" rel="external">'$txt['go_full_site'], '</a><br />
SMF4Mobile '
$context['smf4mobile_version'], ' &copy; <a href="http://smf-media.com">SMF-Media.com</a><br /><br />
'
,theme_copyright() . get2by2host_copyright(), '
</div></div>'
;

// Show the alternate form of navigation
echo '
<div id="pnav" data-role="page" data-theme="c">
<div data-role="header" data-theme="a">
<a class="ui-btn-left" data-icon="arrow-l" data-iconpos="notext" 
data-rel="back" data-transition="none" href="'
$scripturl ,'">
</a>
<h3>'
$txt['navigation'], '</h3>
</div>
<div data-role="content">
<ul data-role="listview" data-inset="true" data-dividertheme="a">'
;
foreach ($context['footer_controls'] as $control_group)
{
echo '
<li data-role="list-divider">'
$control_group['label'], '</li>';
foreach ($control_group['buttons'] as $button)
echo '
<li data-icon="'
$button['icon'], '" data-theme="c">
<a href="'
$button['url'], '"', !empty($button['confirm']) ? ' data-rel="navpopup"' '''>
'
$button['text'], '
</a>
</li>'
;
}
echo '
</ul>
</div>
</div>'
;
}

function 
template_html_below()
{
global $context$settings$options$scripturl$txt$modSettings;

echo '
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree($force_show false)
{
global $context$settings$options$shown_linktree;

// If linktree is empty, just return - also allow an override.
if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
return;

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '
<a href="' 
$tree['url'] . '"><span>' $tree['name'] . '</span></a>' '<span>' $tree['name'] . '</span>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo ' <span style="font-style: 15em;">></span> ';
}

$shown_linktree true;
}

// Generate a strip of buttons.
function template_button_strip($button_strip$group 'page'$label ''$new_format false)
{
global $settings$context$txt$scripturl;

if (empty($new_format))
return template_button_strip($button_strip'page'$txt['page_actions'], true);

if (empty($label))
$label $txt['page_actions'];

// Create the buttons...
$buttons = array();
foreach ($button_strip as $key => $value)
{
if (!isset($value['test']) || (is_bool($value['test']) && !empty($value['test'])) || !empty($context[$value['test']]))
$buttons[] = array(
'url' => $value['url'], 'text' => $txt[$value['text']], 'icon' => !empty($value['icon']) ? $value['icon'] : '''custom' => isset($value['custom']) ? $value['custom'] : '''confirm' => !empty($value['confirm']) ? $value['confirm'] : '',
);
}

if (empty($context['footer_controls'][$group]))
$context['footer_controls'][$group] = array(
'label' => $label,
'buttons' => array(),
);

$context['footer_controls'][$group]['buttons'] = array_merge((array) $context['footer_controls'][$group]['buttons'], $buttons);
}

// A little template to provide generic popip confirm dialogs for our various actions
function template_popup_confirm($id$confirm_link$body '')
{
global $txt;

echo '
<div data-role="popup" id="'
$id'" data-overlay-theme="a" data-theme="c" class="ui-corner-all" style="max-width:400px; min-width: 300px;">
<div data-role="header" data-theme="a" class="ui-corner-top">
<h1>'
$txt['confirm_sure'], '</h1>
</div>
<div data-role="content" data-theme="d" class="ui-corner-bottom ui-content">
<p class="dialog_message">'
$body'</p>
<div class="ui-grid-a">
<div class="ui-block-a"><a class="dialog_confirm" data-role="button" href="'
$confirm_link'" data-theme="a">'$txt['confirm'], '</a></div>
<div class="ui-block-b"><a class="dialog_deny" data-role="button" href="#" data-rel="back">'
$txt['cancel'], '</a></div>
</div>
</div>
</div>'
;
}
?>



I want to put the text only for guest after this string

<div data-role="header" data-theme="b" data-backbtn="false">
<div align="center"><a href="http://www.calciocataniaforum.it"><img border="0" src="http://www.calciocataniaforum.it/images/logo-mobile.png" /></a></div>', count($context['linktree']) > 1 ? '
<a href="' . $context['linktree'][count($context['linktree']) - (in_array($context['current_action'], array('pm', 'profile')) ? 3 : 2)]['url'] . '" data-icon="arrow-u" data-direction="reverse" class="ui-btn-left" data-iconpos="notext">' . $txt['back'] . '</a>' : '', '
</div><br />
Tutte le news sulla laurea in giurisprudenza e su esame da avvocato

Kindred

so find and replace this whole function....


function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

// The "up one level" URL for PM and profile are actually two levels up
echo '
<div data-role="page" data-theme="b" id="jqm">
<div data-role="header" data-theme="b" data-backbtn="false">
<div align="center"><a href="http://www.calciocataniaforum.it"><img border="0" src="http://www.calciocataniaforum.it/images/logo-mobile.png" /></a></div>', count($context['linktree']) > 1 ? '
<a href="' . $context['linktree'][count($context['linktree']) - (in_array($context['current_action'], array('pm', 'profile')) ? 3 : 2)]['url'] . '" data-icon="arrow-u" data-direction="reverse" class="ui-btn-left" data-iconpos="notext">' . $txt['back'] . '</a>' : '', '
</div><br />

';

if ($context['user']['is_guest'])
echo 'YOURTEXT';

// The main content should go here.
echo '
<div data-role="content">';
}



austin's code was pretty close... but only because the specific section you asked about already had defined $context as a global.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

peppe

Thank you very muchhhhhhhhhhhhhhhhhhhhhhhhhh :) :) :) :) :)
Tutte le news sulla laurea in giurisprudenza e su esame da avvocato

Advertisement: