Recent Topics

1 May 12, 2008 21:42    

My b2evolution Version: Not Entered

Hello:

I’ve set-up a private blog for Members only; when they sign in, the blog is accessible from Admin only. All posts are saved as “Private”.

In each blog there is a menu that has HOME, CONTACT, LOG IN (would that be in body_header.inc.php???)

After a member has signed in, LOG IN disappears.

Here’s what I’d like to do…. (if, I’m not asking for the impossible)
Once a member signs in, on that same menu can "MEMBERS" appear (making it invisible to the public, but visible to Members)? This would be convenient and a reminder for members to review the Members’ blog (announcements and questions) as a menu option when they view their own blog or others blogs.

OR, another option….

Once logged in, Members are directed to the Members’ blog first rather than to the Admin area. (Would you be annoyed with this?)

I have another question about time stamps. Members are often working on their drafts over a week or two. When they are ready to Publish, they forget to change the date for their publication to the current date. Is there an option or place where I can make the Publish date the actual date rather than their draft date for publication? One other thing about the timestamp.... how do I change it from 24 hr clock to normal read. I looked at the time function in Admin but it does seem to work for the time stamp, except when the final post has been published.

I hope someone can help me with these. :D

Thanks,
Tosca

2 May 12, 2008 21:52

Hi tosca, someone wiser would have the exact answers for your needs, but i can give some partial answer or ideas as far as i know; you can display a members' blog link by using 'if( is_logged_in() )' , i dont know the exact usage, i have to dig a little, but it is doable of course.I ve gotta dig that timestamp thing too, but that also sound doable, anyhow, hoping someone will come back with decent answers, take this as a preliminary response (: cheers

3 May 12, 2008 23:02

Hi tilqicom: :D

Look forward to you helping me out, if you find the info. I'm glad this can be doable.

I found a "User Tool" in plug-ins for the "Admin" button as a menu option, but when I edited it in Admin it didn't work. I might be able to fudge around with it and then reload the widget.... maybe.

4 May 12, 2008 23:05

As tilqicom said you can use is_logged_in()

1. Members link. This code goes in header menu div.

if ( is_logged_in() )
{
     echo '<li><a href="#">Members link</a></li>';
}

2. Members redirect. This code goes in the very top of html_header.inc.php right after if( !defined('EVO_MAIN_INIT')......

if ( is_logged_in() )
{
     $redir = 'http://www.Member's Blog URL/index.php';
     header("Location: $redir",TRUE,302);
}

5 May 13, 2008 02:54

Thank you for the info - I'll try your suggestion! :D

Date stamp is the last...

6 May 13, 2008 07:19

Hi:

As tilqicom said you can use is_logged_in()

1. Members link. This code goes in header menu div.
PHP:
if ( is_logged_in() )
{
echo '<li><a href="#">Members link</a></li>';
}

Sorry to ask a dumb question :oops: and this might be obvious to others, but which file should this go in?

Thanks

7 May 13, 2008 07:26

It depends on your skin. Usually it goes in _body_header.inc.php or index.main.php

Find this code and put that link before the closing </ul> tag

<div class="top_menu">
    <ul>
    <?php
        // ------------------------- "Menu" CONTAINER EMBEDDED HERE --------------------------
        // Display container and contents:
        // Note: this container is designed to be a single <ul> list
        skin_container( NT_('Menu'), array(
                // The following params will be used as defaults for widgets included in this container:
                'block_start'         => '',
                'block_end'           => '',
                'block_display_title' => false,
                'list_start'          => '',
                'list_end'            => '',
                'item_start'          => '<li>',
                'item_end'            => '</li>',
            ) );
        // ----------------------------- END OF "Menu" CONTAINER -----------------------------
    ?>
    </ul>
</div>

8 May 13, 2008 07:40

Hi:

WOW! Thanks for your quick response. I'll try that! I know where it is now.

Thanks a lot for your help, once again.

10 May 13, 2008 08:20

Tosca wrote:

Hi:

WOW! Thanks for your quick response. I'll try that! I know where it is now.

Thanks a lot for your help, once again.

hey sam2kb , are you good or what (:, you just gave the answer twice till i ve checked the topic later on, (may be it's the time zone, hehe no it's not, you are good) cheers ;)

12 May 14, 2008 00:31

Hello:

The added Admin link button and it shows up in Members' blog very nicely. Thank you! I placed it here "?>", otherwise, it didn't work placing it before "</ul>" as suggested. This is what it looks like.

// ----------------------------- END OF "Menu" CONTAINER --------------

if ( is_logged_in() )
{
$redir = 'http://www.Member's Blog URL/index.php';
header("Location: $redir",TRUE,302);
}
?>
</ul>
</div>

The second goal that I was trying to achieve was to have a Members' link that can be seen in all the blogs (after logged in). How can this be achieved?

The Redirection, unfortunately, this didn't work:

if ( is_logged_in() )
{
$redir = 'http://www.blah, blah blog/index.php?blog=6';
header("Location: $redir",TRUE,302);
}

Each time I got :

The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

I've logged into several members blogs and they are unable to see the Members' blog, at all. Prior, I had a button accessible in Admin but it seems with the tag it is no longer there. Anyway, I'd like to have a redirection if it is possible when someone logs in, they are directed immediately to the Members' Blog.

Thanks again for your input.... I'm sure we can figure something out.
:)

Tosca

13 May 14, 2008 01:16

i have no idea if that code is proper, but it seemed all right to me : P
this might work


if ( is_logged_in() )
{
# header('Location:  newdestination.php');  
# # {  
#         header('HTTP/1.1 301 Moved Permanently');  
#     }  
#     header('Location: '.$url);  
#     exit();  
# } 
</ul>
</div>
?> 

$url may be needed to be changed to $baseurl

14 May 14, 2008 01:51

Hello Again:

That looked like a brilliant code too, but it didn't work. :-/

Well.... perhaps it would be easier to add a permanent link in ADMIN within one of the menus like the light grey/brown -- to the far right or in the Dashboard?

*MEMBERS BLOG * NAME * 05:32 pm * Blog Blg * Logout Close

Can this be achieved some how with the previous code that you gave me AND adding the color red?

// ----------------------------- END OF "Menu" CONTAINER --------------

if ( is_logged_in() )
{
$redir = 'http://www.Member's Blog URL/index.php';
header("Location: $redir",TRUE,302);
}
?>
</ul>
</div>

What file can this go in?

Thanks again for your assistance. :)

Tosca

15 May 14, 2008 03:00

Hello: :)

I was able to get the MEMBERS blog button to show up in Admin again, so that members can go to the blog (not sure why it became disabled with one of the codes added to it). The redirection would have been helpful; it is okay... they will have to manually remember to go there once logged in. So, this seems to be resolved.

Thank you very much for your help in the other matter with placing a button within the Members' blog.

If anyone finds the Date/Time stamp info that would be helpful.

Have a good day and thank you again.

:D

Tosca


Form is loading...