Recent Topics

1 Jun 11, 2004 19:03    

Hi, does anyone know a way were I can have members login and go straight to my site index and see the members posts, instead of the admin area and then look around for the out to blogs ( index )?

My second question would be, can I have the login username and password discretly put on the main page.

Hope someone can advise.

thnx in advance

http://www.fmki-kaj.org

2 Jun 11, 2004 19:58

Very simpel
Put the next code in your page at the place where you want that people can click to login :

<?php
// Administrative links:
user_login_link( '<li>', '</li>' );
user_register_link( '<li>', '</li>' );
user_admin_link( '<li>', '</li>' );
user_profile_link( '<li>', '</li>' );
user_logout_link( '<li>', '</li>' );
?>

3 Jun 11, 2004 20:03

Thanks Topanga.

But will that bring them straight to the frontpage where they can see the members only blog or does that bring them into the admin first?

4 Jun 11, 2004 20:05

that brings them back to the page they are when they click that button

5 Jun 11, 2004 20:12

I have seen what you mean on the following site: using redirect.

http://isaac.beigetower.org/

Now when they come back it should show the previously hidden members only post.

I don't want anybody who registers to have access only the ones I give permissions to:

Or that just comes later in the process when I check box their permissions to view the members only blog.

sorry for my stupidty :roll:

6 Jun 11, 2004 20:31

So your site is open for new members ?

At my site, people can't register... that means, that only people who are alredy a member, can log in, and obviously, see the members only posts imediately when they come back...

7 Jun 11, 2004 20:35

Ok I just shut up and did it.

great!

Thnx Topang

8 Jun 11, 2004 21:22

It did redirect me to the index page.

how about if I need it to redirect to a another page?

How do I fit the new redirect http:.. nicely into main.php?

<?php
// Administrative links:
user_login_link( '<li>', '</li>' );
?>

9 Jun 11, 2004 21:59

or does the login redirecting go in login.php?

default:
/*
* Default: login form:
*/
if( is_logged_in() )
{ // The user is already logged in...
$error = T_('Note: You are already logged in!');

param( 'redirect_to', 'string', $ReqURI );
if( basename( $redirect_to ) == basename( $_SERVER['SCRIPT_NAME'] ) )
{ // avoid "endless loops"
$redirect_to = $admin_url.'/';
}
$error .= ' <a href="'.$redirect_to.'">'.T_('Continue...').'</a>';
}

// Display login form:
require( dirname(__FILE__).'/_login_form.php' );
exit();

10 Jun 12, 2004 11:16

I have absolutely no clue.
I'm not the kind of woman who's messing around in the code.

The page with all my post ist index.php. Perhaps thats why I don't have a problem.

I hope somebody else will have a sollution.

11 Jun 12, 2004 12:08

As far as I understand it, if you click on the login link on the main page, you will be redirected back to where you came from. If you hit /admin, you'll go to the admin page. The idea is that you don't give people who aren't supposed to get to /admin the address...

12 Jun 12, 2004 17:03

If you see this guys source code.

http://isaac.beigetower.org/

after someone logs in he directs them to his desired blog or category.

If anyone can show me which php file and where to put example.

Thnx Topanga I'm the same. Not that brave to mess around with code I don't really get yet.

But the org is requesting it, so I have to come thru. I know the default is a symbol which tells it to get the index.php. I need it to redir to a specific cat or blog.

13 Jun 12, 2004 17:10

I think it should go in one of these 2 red text places in _function_users.php but i'm not brave to experiment.

* user_login_link(-)
*
* Template tag; Provide a link to login
*/
function user_login_link( $before = '', $after = '', $link_text = '', $link_title = '#' )
{
global $htsrv_url, $blog;

if( is_logged_in() ) return false;

if( $link_text == '' ) $link_text = T_('Login...');
if( $link_title == '#' ) $link_title = T_('Executive Login');

$redir = '';
if( !empty( $blog ) )
{ // We'll want to return to this blog after login
$redir = '?redirect_to='.htmlspecialchars( get_bloginfo('blogurl') );
}

echo $before;
echo '<a href="', $htsrv_url, '/login.php', $redir, '" title="', $link_title, '">';
echo $link_text;

14 Jun 12, 2004 18:17

Have you tried doing what I said? Because what I said does work. I tried it myself this morning. You haven't actually said what blog you want to redirect to. Do you want the user to return to the same blog they left, or a different one?

Ok, I'll explain what each bit of the code you copied does, so you understand where I'm coming from:

$redir = '';
if( !empty( $blog ) )
{ // We'll want to return to this blog after login
$redir = '?redirect_to='.htmlspecialchars( get_bloginfo('blogurl') );
}
The get_bloginfo('blogurl') tells the script which blog the user came from, so it knows where to send them back to.

echo $before;
echo '<a href="', $htsrv_url, '/login.php', $redir, '" title="', $link_title, '">';
This tells the script where to find the login page, which in turn processes the login procedure.

So, if you don't want members to be able to access the admin screen, you need to put this code in your _main.php file:

<?php
// Administrative links:
user_login_link( '<li>', '</li>' );
user_register_link( '<li>', '</li>' );
user_profile_link( '<li>', '</li>' );
user_logout_link( '<li>', '</li>' );
?>

Notice I've removed the admin link, so this means that unless the users specifically know where thappen to stumble upon it, well, there's not much they can do with it anyway.

Now, for your second question. Firstly, it's pretty damn silly to display the user's password on the screen, due to brower histories and caches and stuff, and as such, no existing function shows the password (although I'm sure one could be hacked together).

But, to show the user's username, put this code on your _main.php somewhere:

<?php $User->login(); ?>

You can also display their preferred name (the one they choose on their profile page) by using this code:

<?php $User->prefered_name(); ?>

I'm not sure if those last two will work, since I've never used them, I'm just going by what the manual says here.

15 Jun 12, 2004 18:49

Thnx Graham.

I don't want to go back to the index page where they logged in from. I want to redirect them to a protected members only blog.

so i should put my http://protectedblog here?

$redir = '?redirect_to='.htmlspecialchars( get_bloginfo('http://otherblog') );

$redir = '';
if( !empty( $blog ) )
{ // We'll want to return to this blog after login
$redir = '?redirect_to='.htmlspecialchars( get_bloginfo('blogurl') );
}
The get_bloginfo('blogurl') tells the script which blog the user came from, so it knows where to send them back to.

And here too?
echo $before;
echo '<a href=http://protectedblog', $htsrv_url, '/login.php', $redir, '" title="', $link_title, '">';

16 Jun 12, 2004 19:11

This might work - make a backup of the file before you touch it.

$redir = '';
if( !empty( $blog ) )
{ // We'll want to return to this blog after login
$redir = '?redirect_to= echo 'http://membersblog';;
}

Do not touch the second section. It tells b2evolution where to find the login.php file, which is required to process the login.

17 Jun 12, 2004 19:41

tryed it and didn't work. got a could not parse so I must have put it in wrong.

I'm gonna try on main.php

18 Jun 12, 2004 21:25

Could it be somewhere in the login.php?

Here:

<?php
/**
* file
*
* b2evolution - {@link http://b2evolution.net/}
*
* Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
*
* @copyright (c)2003-2004 by Francois PLANQUE - {@link http://fplanque.net/}
*
* @package b2evolution
*/
require_once( dirname(__FILE__).'/../conf/_config.php' );
require_once( dirname(__FILE__)."/$htsrv_dirout/$core_subdir/_main.php" );

param( 'action', 'string', '' );
param( 'mode', 'string', '' );
// bookmarklet stuff:
param( 'text', 'html', '' );
param( 'popupurl', 'string', '' );
param( 'popuptitle', 'string', '' );

switch($action)
{
case 'logout':
/*
* Logout:
*/
// Do the log out!
logout();

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate"); // for HTTP/1.1
header("Pragma: no-cache");

param( 'redirect_to', 'string', $_SERVER['HTTP_REFERER'] );
$location = empty($redirect_to) ? $baseurl.'/' : $redirect_to;
header("Refresh:0;url=$location");
exit();
break; // case 'logout'

case 'lostpassword':
/*
* Lost password:
*/
param( 'redirect_to', 'string', $admin_url.'/b2edit.php' );
// Display retrieval form:
require( dirname(__FILE__).'/_lostpass_form.php' );
exit();
break; // case 'lostpassword'

case 'retrievepassword':
/*
* Retrieve lost password:
*/
param( 'log', 'string', true );
param( 'redirect_to', 'string', $admin_url.'/b2edit.php' );
// echo 'login: ', $log;
$user_data = get_userdatabylogin($log);
$user_email = $user_data['user_email'];

locale_temp_switch( $user_data['user_locale'] );

// echo 'email: ', $user_email;
// echo 'locale: '.$user_data['locale'];

if( empty($user_email) )
{ // pretend that the email is sent for avoiding guessing user_login
$notes = T_('An email with the new password was sent successfully to your email address.')."<br />\n";
}
else
{
$random_password = substr(md5(uniqid(microtime())),0,6);

$message = T_('Login:')." $log\r\n";
$message .= T_('New Password:')." $random_password\r\n";
$message .= "\r\n".T_('You can login here:')."\r\n".$htsrv_url."/login.php\r\n";

// DEBUG!
// echo $message.' (password not set yet, only when sending email does not fail);

if( !send_mail( $user_email, T_('your weblog\'s login/password'), $message, $notify_from ) )
{
$notes = T_('The email could not be sent.')."<br />\n"
.T_('Possible reason: your host may have disabled the mail() function...');
}
else
{
$DB->query( "UPDATE $tableusers
SET user_pass = '" . md5($random_password) . "'
WHERE user_login = '$log'" );
$notes = T_('An email with the new password was sent successfully to your email address.')."<br />\n";
}

}

locale_restore_previous();

default:
/*
* Default: login form:
*/
if( is_logged_in() )
{ // The user is already logged in...
$error = T_('Note: You are already logged in!');

param( 'redirect_to', 'string', $ReqURI );
if( basename( $redirect_to ) == basename( $_SERVER['SCRIPT_NAME'] ) )
{ // avoid "endless loops"
$redirect_to = $admin_url.'/';
}
$error .= ' <a href="'.$redirect_to.'">'.T_('Continue...').'</a>';
}

// Display login form:
require( dirname(__FILE__).'/_login_form.php' );
exit();

} // switch

?>

19 Jun 13, 2004 00:30

Ok, if that didn't work, it's beyond my level of php. Could you give me a url so I can see what error you're getting exactly? It may help me solve this. If I can't maybe one of the actual coders can help (the last suggestion was a pure guess :oops: ).

20 Jun 13, 2004 10:23

Hi Graham,

my login script is on the index.php page which was inserted in main.php:

<?php
// Administrative links:
user_login_link( '<li>', '</li>' );
user_logout_link( '<li>', '</li>' );
?>

// recommended by the kindhearted Topanga //

Now after someone logs in it redirects them back to index.php

I would like to change the default redirection to a different page ( or blog ) or category.

could be as simple as modifying the code above in the main.php ?

thnx

21 Jun 13, 2004 15:24

Umm, could you give me a url to look at? Asking the same question over and over, without answering the questions I ask won't get us very far...

24 Jun 15, 2004 23:57

Hi Isaac,

thats so the members won't get lost when they arrive at that url.

btw sorry to make an account on your site, I was trying to see what it does. your site is very well done.

can you help me with my redirecting problem?

25 Jun 16, 2004 01:49

No problem, I love deleting users named "test." :) (This was my third, actually.) If it really ever bugs me, I'll disallow new registrations or something.

I just skimmed through this thread, and here's what I can offer you off the top of my head:
The "$redirect" variable gets set from the URI. (Go to the login form, and you'll see it says "login.php?redirect=http://etc/url/page.php?querystring=stuff" in the address bar.)

The easiest way to control where someone gets redirected to: Change the link that they click on. Yes, it is as simple as modifying the code above in _main.php. Just hardcode a link to .../htsrv/login.php?redirect=http://example.com/where/you/want/them/to/go.php?cat=45&blog=2&etc
When they login, they'll get forwarded to that url.

26 Jun 16, 2004 06:50

Isaac, do you mean somewhere in this part of login.php

default:
/*
* Default: login form:
*/
if( is_logged_in() )
{ // The user is already logged in...
$error = T_('Note: You are already logged in!');

param( 'redirect_to', 'string', $ReqURI );
if( basename( $redirect_to ) == basename( $_SERVER['SCRIPT_NAME'] ) )
{ // avoid "endless loops"
$redirect_to = $admin_url.'/';
}
$error .= ' <a href="'.$redirect_to.'">'.T_('Continue...').'</a>';
}

// Display login form:
require( dirname(__FILE__).'/_login_form.php' );
exit();

27 Jun 16, 2004 08:52

No, he means to change the link on your _main.php.

28 Jun 16, 2004 14:52

Graham wrote:

No, he means to change the link on your _main.php.

This my _main.php. I just don't know where to put the redirecting link.

I think it goes where i highlighted in red, but I don't know how to put a link cleanly in there.
:oops:

<?php
/*
* This is the main template. It displays the blog.
*
* However this file is not meant to be called directly.
* It is meant to be called automagically by b2evolution.
* To display a blog, you should call a stub file instead, for example:
* /blogs/index.php or /blogs/blog_b.php
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php locale_lang() ?>" lang="<?php locale_lang() ?>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php locale_charset() ?>" />
<title><?php
bloginfo('name', 'htmlhead');
single_cat_title( ' - ', 'htmlhead' );
single_month_title( ' - ', 'htmlhead' );
single_post_title( ' - ', 'htmlhead' );
arcdir_title( ' - ', 'htmlhead' );
last_comments_title( ' - ', 'htmlhead' );
stats_title( ' - ', 'htmlhead' );
?>
</title>
<base href="<?php skinbase(); // Base URL for this skin. You need this to fix relative links! ?>" />
<meta name="description" content="<?php bloginfo('shortdesc', 'htmlattr'); ?>" />
<meta name="keywords" content="<?php bloginfo('keywords', 'htmlattr'); ?>" />
<meta name="generator" content="b2evolution <?php echo $b2_version ?>" /> <!-- Please leave this for stats -->
<link rel="alternate" type="text/xml" title="RDF" href="<?php bloginfo('rdf_url', 'raw'); ?>" />
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss2_url', 'raw'); ?>" />
<link rel="alternate" type="text/xml" title="RSS 2.0" href="<?php bloginfo('rss2_url', 'raw'); ?>" />
<link rel="alternate" type="application/atom+xml" title="Atom" href="<?php bloginfo('atom_url', 'raw'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url', 'raw'); ?>" />
<link rel="stylesheet" href="custom.css" type="text/css" />
</head>
<body>
<div id="wrap"> <!-- #wrap - for centering -->
<div class="pageHeader">

<?php // --------------------------- BLOG LIST INCLUDED HERE -----------------------------
require( dirname(__FILE__)."/_bloglist.php");
// ---------------------------------- END OF BLOG LIST --------------------------------- ?>

<h1 id="pageTitle"><?php bloginfo('name', 'htmlbody') ?></h1>

<div class="pageSubTitle"><?php bloginfo('tagline', 'htmlbody') ?></div>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
width="780" height="200" align="center">
<param name=movie value="http://www.fmki-kaj.org/articles/skins/TicTac/img/bcktest.swf" />
<param name=quality value=high />
<param name=bgcolor value=#FFFFFF />
<embed src="http://www.fmki-kaj.org/articles/skins/TicTac/img/bcktest.swf" width="780" height="200" align="center" quality=high bgcolor=#FFFFFF
type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
</object>
</div>

<div id="content"> <!-- #content wrapper -->
<div class="bPosts"> <!-- Begin #bPosts -->
<h2><?php
single_cat_title();
single_month_title();
single_post_title();
arcdir_title();
last_comments_title();
stats_title();
profile_title();
?></h2>

<!-- =================================== START OF MAIN AREA =================================== -->

<?php // ------------------------------------ START OF POSTS ----------------------------------------
if( isset($MainList) ) $MainList->display_if_empty(); // Display message if no post

if( isset($MainList) ) while( $Item = $MainList->get_item() )
{
$MainList->date_if_changed();
?>
<div class="bPost" lang="<?php $Item->lang() ?>">
<?php permalink_anchor(); ?>
<div class="bSmallHead">
<a href="<?php $Item->permalink() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><img src="img/icon_minipost.gif" alt="Permalink" width="12" height="9" class="middle" /></a>
<?php
// the_time();
echo T_('Categories'), ': ';
the_categories();
echo ' &nbsp; ';
locale_flag( $Item->locale, 'h10px' ); // Display flag for post locale
// echo ', ';
// the_wordcount();
// echo ' ', T_('words');
?>
</div>
<h3 class="bTitle"><?php $Item->title(); ?></h3>
<div class="bText">
<?php $Item->content(); ?>
<?php link_pages("<br />Pages: ","<br />","number") ?>
</div>
<div class="bSmallPrint">
<?php $Item->feedback_link( 'comments' ) // Link to comments ?>
<?php $Item->feedback_link( 'trackbacks', ' &bull; ' ) // Link to trackbacks ?>
<?php $Item->trackback_rdf() // trackback autodiscovery information ?>
<?php $Item->feedback_link( 'pingbacks', ' &bull; ' ) // Link to trackbacks ?>
-
<a href="<?php $Item->permalink() ?>" title="<?php echo T_('Permanent link to full entry') ?>" >Permalink</a>
</div>
<?php // ---------------- START OF INCLUDE FOR COMMENTS, TRACKBACK, PINGBACK, ETC. ----------------
$disp_comments = 1; // Display the comments if requested
$disp_comment_form = 1; // Display the comments form if comments requested
$disp_trackbacks = 1; // Display the trackbacks if requested

$disp_trackback_url = 1; // Display the trackbal URL if trackbacks requested
$disp_pingbacks = 1; // Display the pingbacks if requested
require( dirname(__FILE__)."/_feedback.php");
// ------------------- END OF INCLUDE FOR COMMENTS, TRACKBACK, PINGBACK, ETC. ------------------- ?>
</div>
<?php } // ---------------------------------- END OF POSTS ------------------------------------ ?>

<p class="center"><strong><?php posts_nav_link(); ?></strong></p>

<?php // ---------------- START OF INCLUDES FOR LAST COMMENTS, STATS ETC. ----------------
switch( $disp )
{
case 'comments':
// this includes the last comments if requested:
require( dirname(__FILE__).'/_lastcomments.php' );
break;

case 'stats':
// this includes the statistics if requested:
require( dirname(__FILE__).'/_stats.php');
break;

case 'arcdir':
// this includes the archive directory if requested
require( dirname(__FILE__).'/_arcdir.php');
break;

case 'profile':
// this includes the profile form if requested
require( dirname(__FILE__).'/_profile.php');
break;
}
// ------------------- END OF INCLUDES FOR LAST COMMENTS, STATS ETC. ------------------- ?>
</div> <!-- End #bpost -->
</div>

<!-- =================================== START OF SIDEBAR =================================== -->

<div class="bSideBar">

<div class="bSideItem">
<h3><?php bloginfo('name', 'htmlbody') ?></h3>
<p><?php bloginfo('longdesc', 'htmlbody'); ?></p>
<p class="center"><strong><?php posts_nav_link(); ?></strong></p>
<!--?php next_post(); // activate this if you want a link to the next post in single page mode ?-->
<!--?php previous_post(); // activate this if you want a link to the previous post in single page mode ?-->
<ul>
<li><a href="<?php bloginfo('staticurl', 'raw') ?>"><strong><?php echo T_('Recently') ?></strong></a> <span class="dimmed"><?php echo T_('(cached)') ?></span></li>
<li><a href="<?php bloginfo('dynurl', 'raw') ?>"><strong><?php echo T_('Recently') ?></strong></a> <span class="dimmed"><?php echo T_('(no cache)') ?></span></li>
</ul>
<?php // -------------------------- CALENDAR INCLUDED HERE -----------------------------
require( dirname(__FILE__)."/_calendar.php");
// -------------------------------- END OF CALENDAR ---------------------------------- ?>
<ul>
<li><a href="<?php bloginfo('lastcommentsurl') ?>"><strong><?php echo T_('Last comments') ?></strong></a></li>
<li><a href="<?php bloginfo('blogstatsurl') ?>"><strong><?php echo T_('Some viewing statistics') ?></strong></a></li>
</ul>
</div>

<div class="bSideItem">
<h3 class="sideItemTitle"><?php echo T_('Search') ?></h3>
<form name="SearchForm" method="get" class="search" action="<?php bloginfo('blogurl') ?>">
<input type="text" name="s" size="30" value="<?php echo htmlspecialchars($s) ?>" class="SearchField" /><br />
<input type="radio" name="sentence" value="AND" id="sentAND" <?php if( $sentence=='AND' ) echo 'checked="checked" ' ?>/><label for="sentAND"><?php echo T_('All Words') ?></label>
<input type="radio" name="sentence" value="OR" id="sentOR" <?php if( $sentence=='OR' ) echo 'checked="checked" ' ?>/><label for="sentOR"><?php echo T_('Some Word') ?></label>
<input type="radio" name="sentence" value="sentence" id="sentence" <?php if( $sentence=='sentence' ) echo 'checked="checked" ' ?>/><label for="sentence"><?php echo T_('Entire phrase') ?></label>
<input type="submit" name="submit" value="<?php echo T_('Search') ?>" />
<input type="reset" value="<?php echo T_('Reset form') ?>" />
</form>
</div>

<div class="bSideItem">
<h3><?php echo T_('Categories') ?></h3>
<form action="<?php bloginfo('blogurl', 'raw') ?>" method="get">
<?php // -------------------------- CATEGORIES INCLUDED HERE -----------------------------
require( dirname(__FILE__)."/_categories.php");
// -------------------------------- END OF CATEGORIES ---------------------------------- ?>
<br />
<input type="submit" value="<?php echo T_('Get selection') ?>" />
<input type="reset" value="<?php echo T_('Reset form') ?>" />
</form>
</div>

<div class="bSideItem">
<h3><?php echo T_('Archives') ?></h3>
<ul>
<?php // -------------------------- ARCHIVES INCLUDED HERE -----------------------------
require( dirname(__FILE__)."/_archives.php");
// -------------------------------- END OF ARCHIVES ---------------------------------- ?>
<li><a href="<?php bloginfo('blogurl') ?>?disp=arcdir"><?php echo T_('more...') ?></a></li>
</ul>
</div>

<div class="bSideItem">
<h3><?php echo T_('Choose skin') ?></h3>
<ul>
<?php // ---------------------------------- START OF SKIN LIST ----------------------------------
for( skin_list_start(); skin_list_next(); ) { ?>
<li><a href="<?php skin_change_url() ?>"><?php skin_list_iteminfo( 'name', 'htmlbody' ) ?></a></li>
<?php } // --------------------------------- END OF SKIN LIST --------------------------------- ?>
</ul>
</div>

<?php if (! $stats)
{ ?>

<div class="bSideItem">
<h3><?php echo T_('Recent Referers') ?></h3>
<?php refererList(5,'global',0,0,'no','',($blog>1)?$blog:''); ?>
<ul>
<?php if( count( $res_stats ) ) foreach( $res_stats as $row_stats ) { ?>
<li><a href="<?php stats_referer() ?>"><?php stats_basedomain() ?></a></li>
<?php } // End stat loop ?>
<li><a href="<?php $Blog->disp( 'blogstatsurl', 'raw' ) ?>"><?php echo T_('more...') ?></a></li>
</ul>
<br />
<h3><?php echo T_('Top Referers') ?></h3>
<?php refererList(5,'global',0,0,'no','baseDomain',($blog>1)?$blog:''); ?>
<ul>
<?php if( count( $res_stats ) ) foreach( $res_stats as $row_stats ) { ?>
<li><a href="<?php stats_referer() ?>"><?php stats_basedomain() ?></a></li>
<?php } // End stat loop ?>
<li><a href="<?php $Blog->disp( 'blogstatsurl', 'raw' ) ?>"><?php echo T_('more...') ?></a></li>
</ul>
</div>

<?php } ?>

<?php // -------------------------- BLOGROLL INCLUDED HERE -----------------------------
require( dirname(__FILE__)."/_linkblog.php");
// -------------------------------- END OF BLOGROLL ---------------------------------- ?>

<div class="bSideItem">
<h3><?php echo T_('Misc') ?></h3>
<ul>
<?php
user_login_link( '<li>', '</li>' );
user_register_link( '<li>', '</li>' );
user_admin_link( '<li>', '</li>' );
user_profile_link( '<li>', '</li>' );
user_logout_link( '<li>', '</li>' );
?>
</ul>

</div>

<div class="bSideItem">
<h3><?php echo T_('Syndicate this blog') ?> <img src="../../img/xml.gif" alt="XML" width="36" height="14" class="middle" /></h3>

<ul>
<li><a href="<?php bloginfo('rss_url', 'raw'); ?>">RSS 0.92 (Userland)</a></li>
<li><a href="<?php bloginfo('rdf_url', 'raw'); ?>">RSS 1.0 (RDF)</a></li>
<li><a href="<?php bloginfo('rss2_url', 'raw'); ?>">RSS 2.0 (Userland)</a></li>
<li><a href="<?php bloginfo('atom_url', 'raw'); ?>">Atom 0.3</a></li>
</ul>
<a href="http://fplanque.net/Blog/devblog/2004/01/10/p456" title="External - English">What is RSS?</a>

</div>

<p class="center">powered by<br />
<a href="http://b2evolution.net/" title="b2evolution home"><img src="../../img/b2evolution_button.png" alt="b2evolution" width="80" height="15" border="0" class="middle" /></a></p>

</div>
<div class="clear">&nbsp;</div>
<div id="footer">
<p class="baseline">
<a href="http://validator.w3.org/check/referer"><img style="border:0;width:88px;height:31px" src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" class="middle" /></a>

<a href="http://jigsaw.w3.org/css-validator/"><img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" class="middle" /></a>

<a href="http://feedvalidator.org/check.cgi?url=<?php bloginfo('rss2_url', 'raw'); ?>"><img src="../../img/valid-rss.png" alt="Valid RSS!" style="border:0;width:88px;height:31px" class="middle" /></a>

<a href="http://feedvalidator.org/check.cgi?url=<?php bloginfo('atom_url', 'raw'); ?>"><img src="../../img/valid-atom.png" alt="Valid Atom!" style="border:0;width:88px;height:31px" class="middle" /></a>
&nbsp;
<?php
log_hit(); // log the hit on this page
if ($debug==1)
{
printf( T_('Totals: %d posts - %d queries - %01.3f seconds'), $result_num_rows, $querycount, timer_stop() );
}
?>
</p>
</div>

</body>
</html>

29 Jun 16, 2004 22:09

Tony,

Please stop posting the entire contents of files. Usually only a little bit is required to get your point across, and so far, you've highlighted the correct part each time. Just paste the part that you would highlight. Thanks.

Add this to your _main.php somewhere (anywhere you like, really), and tell us if that's what you want:

<a href="http://www.fmki-kaj.org/articles/htsrv/login.php?redirect_to=http://www.fmki-kaj.org/articles/index.php?blog=9">Login link</a>

If that's not what you want, please let us know what's wrong with it, and we'll do our best to solve your problem.

30 Jun 17, 2004 13:50

Sorry Issac, it must have been desperation, I have never done that before.
I thought the problem was so easy to solve but I still couldn't solve it.

Ok.
<ul>
<?php
user_login_link( '<li>', '</li>' ); <----- This is where it should go
user_register_link( '<li>', '</li>' );
user_admin_link( '<li>', '</li>' );
user_profile_link( '<li>', '</li>' );
user_logout_link( '<li>', '</li>' );
?>
</ul>

<a href="http://www.fmki-kaj.org/articles/htsrv/login.php?redirect_to=http://www.fmki-kaj.org/articles/index.php?blog=9">Login link</a>

do I just replace the green code with the red code or does the red code fit inside the green code.

I know you guys are laughing but plz I gotta know :lol:

thnx!

31 Jun 17, 2004 14:40

<ul>
<li><a href="http://www.fmki-kaj.org/articles/htsrv/login.php?redirect_to=http://www.fmki-kaj.org/articles/index.php?blog=9">Login link</a></li>
<?php
user_register_link( '<li>', '</li>' );
user_admin_link( '<li>', '</li>' );
user_profile_link( '<li>', '</li>' );
user_logout_link( '<li>', '</li>' );
?>
</ul>

That should sort you out.

32 Jun 17, 2004 16:54

Thanks all for your kind patience. :D

I am gonna go read a php book and a few others

cheers![/b]

33 Sep 01, 2005 02:47

in the /b2evocore/_functions_user.php file change the following variable assignment $redirect= for the login function to send to the home page, a similar change is made for the logout/register/profile functions as well

also note that if using multiple blogs you will want to fill in the last $redirect= ''; to contain the home page as shown

function user_login_link( $before = '', $after = '', $link_text = '', $link_title = '#' )
{
global $htsrv_url, $edited_Blog, $generating_static;

if( is_logged_in() ) return false;

if( $link_text == '' ) $link_text = T_('Login...');
if( $link_title == '#' ) $link_title = T_('Login if you have an account...');

if( !isset($generating_static) )
{ // We are not generating a static page here:
$redirect = '?redirect_to=http:%2F%2Fliberty.hypermart.net%2Fcgi-bin%2Fblogs%2Findx.php';
}
elseif( isset($edited_Blog) )
{ // We are generating a static page
$redirect = '?redirect_to='.$edited_Blog->get('dynurl');
}
else
{ // We are in a weird situation
$redirect = '?redirect_to=http:%2F%2Fliberty.hypermart.net%2Fcgi-bin%2Fblogs%2Findx.php';
}


Form is loading...