You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 64 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - What Seems To Be The Problem With.......... [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
lost3
Lieutenant
Lieutenant


Joined: Aug 16, 2004
Posts: 163


PostPosted: Wed Jul 11, 2007 5:39 am Reply with quoteBack to top

Hello,

I am tottally breaking my head over here. Can someone tell me what am I missing that the block shows up following:

{RANDOM_USER_PIC}
{RANDOM_USER}
{PROFILE_SEX}
{AGE}
{LOCATION}


Like if it doesn't recognize what those things are. Instead of the picture name and age it just shows the words.

If anyone can answer me this I will be soooooooooooo greatful.

Thanks for the read.
Find all posts by lost3View user's profileSend private message
eXistenZe
Sergeant
Sergeant


Joined: Mar 03, 2007
Posts: 127


PostPosted: Sat Jul 14, 2007 7:13 am Reply with quoteBack to top

you need to give us the block code...
Find all posts by eXistenZeView user's profileSend private message
lost3
Lieutenant
Lieutenant


Joined: Aug 16, 2004
Posts: 163


PostPosted: Mon Jul 16, 2007 6:45 am Reply with quoteBack to top

Thanks for the reply. The following code is for ExPortal but I tried so much to make it work for Nuke and I can't for the life of me get it to work. Here's the code:

Code:
#
#-----[ OPEN ]------------------------------------------
#

portal.php

#
#-----[ FIND ]------------------------------------------------
#
//
// Generate the page
//

#
#-----[ BEFORE, ADD ]-----------------------------------------
#
///////////////////////////////////////////////////////////////////////
// BEGIN Random User
///////////////////////////////////////////////////////////////////////
if ( $board_config['mps_allow_random_user'] == 1 )
{

   $template->assign_block_vars('random_users', array());

    function random_user()
    {
      global $db;

    $sql = "SELECT *
                FROM " . MPS_TABLE . " m, " . USERS_TABLE . " u
                    WHERE m.mps_id = u.user_id
               AND u.user_active = 1
               AND u.user_allowmps = 1
               AND m.private_profile = 0
               AND u.user_id <> " . ANONYMOUS . "
                ORDER BY RAND() LIMIT 1";
        if ( !($result = $db->sql_query($sql)) )
        {
          message_die(GENERAL_ERROR, 'Could not query random user data.', '', __LINE__, __FILE__, $sql);
        }
        return ( $row = $db->sql_fetchrow($result) ) ? $row : false;
    }
          $random_data = random_user();
               $no_gender = 'images/no_photo.jpg';
               $gender_male = 'images/no_photo_male.jpg';
               $gender_female = 'images/no_photo_female.jpg';

               if ( $random_data['sex'] == 1 )
               {
                  $no_image = $gender_female;
               }
               else if ( $random_data['sex'] == 2 )
               {
                  $no_image = $gender_male;
               }
               else
               {
                  $no_image = $no_gender;
               }

               $photo_img = '<img src="' . $no_image . '" width="' . $board_config['mps_max_pic_width_global'] .'" border=0>';
               if ( $random_data['user_avatar_type'] && $random_data['user_allowavatar'] )
               {
                  switch( $random_data['user_avatar_type'] )
                  {
                     case USER_AVATAR_UPLOAD:
                        $photo_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $random_data['user_avatar'] . '" alt="" border="0" width="' . $board_config['mps_max_pic_width_global'] .'" />' : '';
                        break;
                     case USER_AVATAR_REMOTE:
                        $photo_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $random_data['user_avatar'] . '" alt="" border="0" width="' . $board_config['mps_max_pic_width_global'] .'" />' : '';
                        break;
                     case USER_AVATAR_GALLERY:
                        $photo_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $random_data['user_avatar'] . '" alt="" border="0" width="' . $board_config['mps_max_pic_width_global'] .'" />' : '';
                        break;
                  }
               }

         if ( $board_config['mps_mod_album_system'] == 1 )
         {       
               $photo_img3 = '';
               if ( $random_data['user_photo_type'] )
               {
                  switch( $random_data['user_photo_type'] )
                  {
                     case USER_AVATAR_UPLOAD:
                        $photo_img3 = ( $board_config['allow_photo_upload'] ) ? '<img src="' . $board_config['photo_path'] . '/' . $random_data['user_photo'] . '" alt="" border="0" width="' . $board_config['mps_max_pic_width_global'] .'" />' : '';
                        break;
                     case USER_AVATAR_REMOTE:
                        $photo_img3 = ( $board_config['allow_photo_remote'] ) ? '<img src="' . $random_data['user_photo'] . '" alt="" border="0" width="' . $board_config['mps_max_pic_width_global'] .'" />' : '';
                        break;
                  }
               }

            if ( $random_data['user_photo'] != "" )
            {   
               $profile_pic = $photo_img3;
            }
            else
            {
               $profile_pic = $photo_img;
            }

         }
         else
         {
            $profile_pic = $photo_img;
         }

      if ( $board_config['mps_mod_b_day_system'] == 1 )
      {   
         $birthday = '&nbsp;';
         if ( !empty($random_data['user_birthday']) )
         {
            $bday_month_day = floor($random_data['user_birthday'] / 10000);
            $bday_year_age = $random_data['user_birthday'] - 10000*$bday_month_day;
            $fudge = ( gmdate('md') < $bday_month_day ) ? 1 : 0;
            $age = ( $bday_year_age ) ? (gmdate('Y')-$bday_year_age-$fudge) : '';

             
            $mps_age = $age . ' ' . $lang['years_old'];
         }
      }
      else
      {
         $mps_age = '';
      }

   $sex = $random_data['sex'];
   
   for ($i = count($genders_count)-1; $i >= 0; $i--)
   {
      if ($sex == $genders_count[$i])
      {
            $sex_html .= "<option value=\"" . $genders_count[$i] . "\" SELECTED>" . $genders[$i] . "</option>";
      }
   }

   $random_user = $random_data['username'];
   $random_user_pic = $profile_pic;
    $random_user_link = "profile.php?mode=viewprofile&u=" . $random_data['user_id'];
   
   $template->assign_vars(array(
      'L_RANDOM_USERS' => $lang['mps_random_users'],
      'L_MPS_AGE' => $lang['mps_age'],
      'RANDOM_USER' => $random_user,
      'RANDOM_USER_PIC' => $random_user_pic,
      'RANDOM_USER_LINK' => $random_user_link,
      'HEADLINE' => '"' . $random_data['self_title'] . '"',
      'MPS_PAGE_TITLE' => $random_data['page_title'],
      'PROFILE_SEX' => $sex_html,
      'MPS_AGE' => $mps_age,
      'LOCATION' => ( $random_data['user_from'] ) ? $random_data['user_from'] : '&nbsp;',
   ));
           $i++;
}
///////////////////////////////////////////////////////////////////////
// END Random User
///////////////////////////////////////////////////////////////////////

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/portal_body.tpl

#
#-----[ FIND ]------------------------------------------------
#This is just where I placed it.  You can put this anywhere on the page you wish it to display.

      <td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE}<br /><br />{LOGGED_IN_USER_LIST}<br /><br /></span><div align="center" class="gensmall">[ <a href="{U_VIEWONLINE}">{L_VIEW_COMPLETE_LIST}</a> ]</div><span class="gensmall"><br />{RECORD_USERS}<br />&nbsp;</span></td>
      </tr>
     </table>
     <br />

#
#-----[ AFTER, ADD ]-----------------------------------------
#
<!-- BEGIN random_users -->   
 <tr>
    <td>
      <table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="3">

        <tr>
          <th class="thSides" colspan="3" height="25" valign="middle">{L_RANDOM_USERS}</th>
        </tr>
         <tr>
            <td class="row2" colspan="2"><div align="center"><span class="gen"><b>{HEADLINE}</b></span></div></td>
         </tr>
         <tr>
            <td class="row2" width="40%"><div align="center"><span class="gen"><A href="{RANDOM_USER_LINK}" class="mainmenu">{RANDOM_USER_PIC}</A></span></div></td>
            <td class="row2" width="60%" valign="top">
               <table width="100%" border="0" cellspacing="1" cellpadding="3">
               <tr>
                  <td><div align="left"><span class="gen"><b><A href="{RANDOM_USER_LINK}">{RANDOM_USER}</A></b></span></div></td>
               </tr>
               <tr>
                  <td><div align="left"><span class="gen">{PROFILE_SEX}</span></div></td>
               </tr>
               <tr>
                  <td><div align="left"><span class="gen">{MPS_AGE}</span></div></td>
               </tr>
               <tr>
                  <td><div align="left"><span class="gen">{LOCATION}</span></div></td>
               </tr>                               
            </table>   
            </td>
         </tr>         
         </table>
      </td>
   </tr>
<!-- END random_users -->

#
#----------[ SAVE AND CLOSE ALL FILES ]-----------------
#
# EoM


If you could help me I would greatly appreciate it.

Thanks again.
Find all posts by lost3View user's profileSend private message
eXistenZe
Sergeant
Sergeant


Joined: Mar 03, 2007
Posts: 127


PostPosted: Mon Jul 16, 2007 12:25 pm Reply with quoteBack to top

You do realize that what you posted is not the block itself, but the instructions, right?
Find all posts by eXistenZeView user's profileSend private message
lost3
Lieutenant
Lieutenant


Joined: Aug 16, 2004
Posts: 163


PostPosted: Tue Jul 17, 2007 12:19 pm Reply with quoteBack to top

Yes. I took what it showed there and I tried to work it the way I thought could work and it didn't work. Here is what I placed in the block.

Code:
<?php
#### Generated by Block Creator by Disipal Site (www.disipal.net) ###
if (eregi("block-Profiles.php",$PHP_SELF)) {
    Header("Location: index.php");
    die();
}

//get module configs
$modname = "Forums";

//get language file
get_lang($modname);

if ( $board_config['mps_allow_random_user'] == 1 )
{

   $template->assign_block_vars('random_users', array());

    function random_user()
    {
      global $db;

    $sql = "SELECT *
                FROM " . MPS_TABLE . " m, " . USERS_TABLE . " u
                    WHERE m.mps_id = u.user_id
               AND u.user_active = 1
               AND u.user_allowmps = 1
               AND m.private_profile = 0
               AND u.user_id <> " . ANONYMOUS . "
                ORDER BY RAND() LIMIT 1";
        if ( !($result = $db->sql_query($sql)) )
        {
          message_die(GENERAL_ERROR, 'Could not query random user data.', '', __LINE__, __FILE__, $sql);
        }
        return ( $row = $db->sql_fetchrow($result) ) ? $row : false;
    }
          $random_data = random_user();
               $no_gender = 'modules/Forums/images/no_photo.jpg';
               $gender_male = 'modules/Forums/images/no_photo_male.jpg';
               $gender_female = 'modules/Forums/images/no_photo_female.jpg';

               if ( $random_data['sex'] == 1 )
               {
                  $no_image = $gender_female;
               }
               else if ( $random_data['sex'] == 2 )
               {
                  $no_image = $gender_male;
               }
               else
               {
                  $no_image = $no_gender;
               }

               $photo_img = '<img src="' . $no_image . '" width="' . $board_config['mps_max_pic_width_global'] .'" border=0>';
               if ( $random_data['user_avatar_type'] && $random_data['user_allowavatar'] )
               {
                  switch( $random_data['user_avatar_type'] )
                  {
                     case USER_AVATAR_UPLOAD:
                        $photo_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $random_data['user_avatar'] . '" alt="" border="0" width="' . $board_config['mps_max_pic_width_global'] .'" />' : '';
                        break;
                     case USER_AVATAR_REMOTE:
                        $photo_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $random_data['user_avatar'] . '" alt="" border="0" width="' . $board_config['mps_max_pic_width_global'] .'" />' : '';
                        break;
                     case USER_AVATAR_GALLERY:
                        $photo_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $random_data['user_avatar'] . '" alt="" border="0" width="' . $board_config['mps_max_pic_width_global'] .'" />' : '';
                        break;
                  }
               }

         if ( $board_config['mps_mod_album_system'] == 1 )
         {      
               $photo_img3 = '';
               if ( $random_data['user_photo_type'] )
               {
                  switch( $random_data['user_photo_type'] )
                  {
                     case USER_AVATAR_UPLOAD:
                        $photo_img3 = ( $board_config['allow_photo_upload'] ) ? '<img src="' . $board_config['photo_path'] . '/' . $random_data['user_photo'] . '" alt="" border="0" width="' . $board_config['mps_max_pic_width_global'] .'" />' : '';
                        break;
                     case USER_AVATAR_REMOTE:
                        $photo_img3 = ( $board_config['allow_photo_remote'] ) ? '<img src="' . $random_data['user_photo'] . '" alt="" border="0" width="' . $board_config['mps_max_pic_width_global'] .'" />' : '';
                        break;
                  }
               }

            if ( $random_data['user_photo'] != "" )
            {   
               $profile_pic = $photo_img3;
            }
            else
            {
               $profile_pic = $photo_img;
            }

         }
         else
         {
            $profile_pic = $photo_img;
         }

      if ( $board_config['mps_mod_b_day_system'] == 1 )
      {   
         $birthday = '&nbsp;';
         if ( !empty($random_data['user_birthday']) )
         {
            $bday_month_day = floor($random_data['user_birthday'] / 10000);
            $bday_year_age = $random_data['user_birthday'] - 10000*$bday_month_day;
            $fudge = ( gmdate('md') < $bday_month_day ) ? 1 : 0;
            $age = ( $bday_year_age ) ? (gmdate('Y')-$bday_year_age-$fudge) : '';

            
            $mps_age = $age . ' ' . $lang['years_old'];
         }
      }
      else
      {
         $mps_age = '';
      }

   $sex = $random_data['sex'];
   
   for ($i = count($genders_count)-1; $i >= 0; $i--)
   {
      if ($sex == $genders_count[$i])
      {
            $sex_html .= "<option value=\"" . $genders_count[$i] . "\" SELECTED>" . $genders[$i] . "</option>";
      }
   }

   $random_user = $random_data['username'];
   $random_user_pic = $profile_pic;
    $random_user_link = append_sid("modules.php?name=Forums&file=profile&mode=viewprofile&u=" . $random_data['user_id']);
   
   $template->assign_vars(array(
      'L_RANDOM_USERS' => $lang['mps_random_users'],
      'L_MPS_AGE' => $lang['mps_age'],
      'RANDOM_USER' => $random_user,
      'RANDOM_USER_PIC' => $random_user_pic,
      'RANDOM_USER_LINK' => $random_user_link,
      'HEADLINE' => '"' . $random_data['self_title'] . '"',
      'MPS_PAGE_TITLE' => $random_data['page_title'],
      'PROFILE_SEX' => $sex_html,
      'MPS_AGE' => $mps_age,
      'LOCATION' => ( $random_data['user_from'] ) ? $random_data['user_from'] : '&nbsp;',
   ));
           $i++;
}


$content  =  "<!-- BEGIN random_users -->    ";
$content  .= " <tr> ";
$content  .= "    <td> ";
$content  .= "      <table class=\"forumline\" width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"3\"> ";
$content  .= "";
$content  .= "        <tr> ";
$content  .= "          <th class=\"thSides\" colspan=\"3\" height=\"25\" valign=\"middle\">{L_RANDOM_USERS}</th> ";
$content  .= "        </tr> ";
$content  .= "         <tr> ";
$content  .= "            <td class=\"row2\" colspan=\"2\"><div align=\"center\"><span class=\"gen\"><b>{HEADLINE}</b></span></div></td> ";
$content  .= "         </tr> ";
$content  .= "         <tr> ";
$content  .= "            <td class=\"row2\" width=\"40%\"><div align=\"center\"><span class=\"gen\"><A href=\"{RANDOM_USER_LINK}\" class=\"mainmenu\">{RANDOM_USER_PIC}</A></span></div></td> ";
$content  .= "            <td class=\"row2\" width=\"60%\" valign=\"top\"> ";
$content  .= "               <table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"3\"> ";
$content  .= "               <tr> ";
$content  .= "                  <td><div align=\"left\"><span class=\"gen\"><b><A href=\"{RANDOM_USER_LINK}\">{RANDOM_USER}</A></b></span></div></td> ";
$content  .= "               </tr> ";
$content  .= "               <tr> ";
$content  .= "                  <td><div align=\"left\"><span class=\"gen\">{PROFILE_SEX}</span></div></td> ";
$content  .= "               </tr> ";
$content  .= "               <tr> ";
$content  .= "                  <td><div align=\"left\"><span class=\"gen\">{MPS_AGE}</span></div></td> ";
$content  .= "               </tr> ";
$content  .= "               <tr> ";
$content  .= "                  <td><div align=\"left\"><span class=\"gen\">{LOCATION}</span></div></td> ";
$content  .= "               </tr>                               ";
$content  .= "            </table>    ";
$content  .= "            </td> ";
$content  .= "         </tr>          ";
$content  .= "         </table> ";
$content  .= "      </td> ";
$content  .= "   </tr> ";
$content  .= "<!-- END random_users --> ";
?>



Where am I messing up? Confused
Find all posts by lost3View user's profileSend private message
lost3
Lieutenant
Lieutenant


Joined: Aug 16, 2004
Posts: 163


PostPosted: Sun Aug 12, 2007 5:42 pm Reply with quoteBack to top

Anyone?
Find all posts by lost3View user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.277 Seconds - 180 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::