+ Reply to Thread (include dating software, release, and patch number!)
Results 1 to 1 of 1

Thread: Add members NickName to Blog page header and page text.

  1. #1
    Prometheus
    Guest

    Default Add members NickName to Blog page header and page text.

    Add members NickName to Blog page header and page text.

    (see screen shots to clarify)


    It is really crazy the booncrap did not "personalize" the members Blogs
    This hack diplays the members nickname in the browser page header as well as on/in the page text.
    Members like to know whos BLOG they are posting to.

    This is much much much better the OTB generic Blog display.....LOL...
    Now instead of just BLOG your/their page will display "NickNames's Blog" and "My Blog" when you are viewing your own blog.

    Those of you using multiple languages may want to use a text call to the lang file instead of hard coding Blog etc into the php file.


    Code:
    
    
    in your page 49 add
    
    <title>__page_header__</title>
    
    if it is not already there.
    
    in your lang file find and replace
    
    '_Blog' => 'Blog',
    
    
    with
    
    '_Blog' => 'My Blog',
    
    
    
    find and replace
    
    '_blog' => 'Blog',
    
    with
    
    '_blog' => 'My Blog',
    
    
    in your blog.php
    
    
    find and delete
    
    $_page['header'] = _t("_Blog");
    $_page['header_text'] = _t("_Blog");
    
    
    
    find and delete
    
    // --------------- page components
    
    $_ni = $_page['name_index'];
    
    if($_GET['uri'] && $_GET['delete'])
    {
    	$_page_cont[$_ni]['page_main_code'] = delete_blog($_GET['uri'], $_GET['delete']);
    }
    elseif($_GET['bid'])
    {
    	$_page_cont[$_ni]['page_main_code'] = show_branch($_GET['bid']);
    }
    elseif($_GET['branch'] && $_GET['owner'] && $_GET['uri'] && $_GET['edit'])
    {
    	$_page_cont[$_ni]['page_main_code'] = write_blog($_GET['branch'], $_GET['owner'], $_GET['uri'], $_GET['edit']);
    }
    elseif($_GET['branch'] && $_GET['owner'] && $_GET['uri'])
    {
    	$_page_cont[$_ni]['page_main_code'] = write_blog($_GET['branch'], $_GET['owner'], $_GET['uri']);
    }
    else
    {
    	$_page_cont[$_ni]['page_main_code'] = show_blogs($_GET['owner'], $_GET['from']);
    }
    
    // --------------- [END] page components
    
    
    
    replace with
    
    
    // --------------- page components
    
    $_ni = $_page['name_index'];
    
    if($_GET['uri'] && $_GET['delete'])
    {
    	$_page_cont[$_ni]['page_main_code'] = delete_blog($_GET['uri'], $_GET['delete']);
    
    }
    elseif($_GET['bid'])
    {
    	$_page_cont[$_ni]['page_main_code'] = show_branch($_GET['bid']);
    
    }
    elseif($_GET['branch'] && $_GET['owner'] && $_GET['uri'] && $_GET['edit'])
    {
    	$_page_cont[$_ni]['page_main_code'] = write_blog($_GET['branch'], $_GET['owner'], $_GET['uri'], $_GET['edit']);
    }
    elseif($_GET['branch'] && $_GET['owner'] && $_GET['uri'])
    {
    	$_page_cont[$_ni]['page_main_code'] = write_blog($_GET['branch'], $_GET['owner'], $_GET['uri']);
    
    	$nick_id = $_GET['owner'];
    	$nick_arr = db_arr("SELECT `NickName`, `Profiles`.`ID` FROM `Profiles` WHERE `ID` = $nick_id ");
    	$_page['header'] = "{$nick_arr['NickName']}'s Blog";
    	$_page['header_text'] = "{$nick_arr['NickName']}'s Blog";
    }
    else
    {
    $_page_cont[$_ni]['page_main_code'] = show_blogs($_GET['owner'], $_GET['from']);
    $_page['header_text'] = _t("_Blog");
    $_page['header'] = _t("_Blog");
    
    }
    
    
    
    // --------------- [END] page components
    
    
    
    You may want to use the simpler code 
    
    $nick_id = $_REQUEST['owner'] ? (int)$_REQUEST['owner'] : (int)$_COOKIE['memberID'];
    
    and place it in the same place as the guestbook hack. It's up to you.
    This is a variation of this hack for the guestbook.

    http://www.modmysite.com/showthread....0302#post20302

    Done.

    Enjoy

    Prometheus
    Attached Images
    Last edited by Prometheus; 03-09-2007 at 06:57 PM.

+ Reply to Thread (include dating software, release, and patch number!)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Question about member search page - Header & Text Colors?
    By Troy in forum Dolphin General Discussion v6.00 and above
    Replies: 1
    Last Post: 12-04-2007, 12:51 AM
  2. Replies: 10
    Last Post: 06-18-2007, 01:21 PM
  3. Replies: 0
    Last Post: 03-26-2007, 02:35 PM
  4. Add members NickName to Guestbook page header and page text.
    By Prometheus in forum Free Mod Exchange
    Replies: 0
    Last Post: 03-09-2007, 06:45 PM
  5. Add your members Nickname to their Guestbook header / title
    By Prometheus in forum Free Mod Exchange
    Replies: 0
    Last Post: 12-22-2006, 02:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts