Welcome to the E-Blah Community!
We would like to welcome you to our community and invite you to register an account or login.
Being a registered member is important, as it gives you several advantages over the normal Guest status. After registering you will be able to download files and images, post messages, and access member-only portions of the forum - just to name a few. Registration is quick and simple, and only takes about a minute of your time.

E-Blah Community    Technical Support    Question and Answer  ›  Menu for Portal
Users Browsing Forum
Yahoo! Bot and 2 Guests

Menu for Portal  This thread currently has 1,914 views. Print
2 Pages 1 2 » Recommend Thread
importracer
January 7, 2003, 11:08pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 90
Posts Per Day: 0.04
Ok, my site is exploding already. Thanks to this great program and it's creators.

I need a better menu system already on the main portal page.

I just created one quickly that linked to each board, but now I need a dynamic menu.

I have boards that are setup for Member Groups and I'd like for the Main Menu to show this.

What I need is a list of each Category title and each board title in each category that a member has permission to view and if they are a guest for this menu to show only areas that are viewable by guests. I do not need the board descriptions or other info listed normally. Just the Category and Board Titles.

Any help with this would be much appreciated.
Logged Offline
Site Site Private Message Private message
Justin
January 9, 2003, 8:11pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,075
Gender: Male
Posts Per Day: 6.52
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 23 hours 27 minutes
Location: Tallassee, AL
Age: 22
Please explain more of what you mean.



- J


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  |  MinistryTalk.com  |  Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV

Logged Offline
Site Site Private Message Private message Reply: 1 - 21
importracer
January 9, 2003, 8:27pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 90
Posts Per Day: 0.04
Ok, you know how if you do not use the portal you get a listing of all the categories and boards that you have permissions to view? I want something like that except all I need is the titles of each category and board that that person has permissions to view listed.
Logged Offline
Site Site Private Message Private message Reply: 2 - 21
Justin
January 9, 2003, 8:33pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,075
Gender: Male
Posts Per Day: 6.52
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 23 hours 27 minutes
Location: Tallassee, AL
Age: 22
'bump' this topic tommorow ... I am busy tonight .... and in a daze with all these qs ... lol ....


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  |  MinistryTalk.com  |  Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV

Logged Offline
Site Site Private Message Private message Reply: 3 - 21
importracer
January 10, 2003, 9:38pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 90
Posts Per Day: 0.04
I think I may be able to do this one. It should be just a modified version of BoardIndex.pl is what I am thinking. I'll try to play around with this and see how that works out.
Logged Offline
Site Site Private Message Private message Reply: 4 - 21
importracer
January 10, 2003, 10:52pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 90
Posts Per Day: 0.04
Ok, I am going out this weekend and getting Perl for Dummies because I don't know what some of this code does. Hopefully that will help fill in some of the blanks for me.
Logged Offline
Site Site Private Message Private message Reply: 5 - 21
DeathBox
January 10, 2003, 11:54pm Report to Moderator Report to Moderator

Official Grammar Nazi
Posts: 326
Gender: Male
Posts Per Day: 0.14
Reputation: 57.14%
Reputation Score: +4 / -3
Location: Prince George, BC, Canada
Age: 18
If you have some IMs, IM me and i could help you if you need to know some stuff. Or better yet Justin, but Im sure hes often busy Better than wasting your money on a book



“Before God we are all equally wise - and equally foolish.”
                                           -- Albert Einstein
Logged Offline
Private Message Private message AIM AIM Windows Live Messenger WLM Reply: 6 - 21
importracer
January 11, 2003, 1:03am Report to Moderator Report to Moderator
E-Blah Member
Posts: 90
Posts Per Day: 0.04
Jedi, thanks. I think I've decided that a static main menu is best since there is other content that I will need to add to that menu. What I really need to be concentrating on is a way for a second news script so I can have my articles posted on the portal page.
Logged Offline
Site Site Private Message Private message Reply: 7 - 21
tsopranolcn
January 11, 2003, 2:45am Report to Moderator Report to Moderator
Guest User
Quoted from importracer, posted January 10, 2003, 10:52pm at here
Ok, I am going out this weekend and getting Perl for Dummies because I don't know what some of this code does. Hopefully that will help fill in some of the blanks for me.


Hey Justin gave me a link to a good place to find some info on Perl if your intrested..


http://www.devshed.com/
Logged
E-mail E-mail Reply: 8 - 21
Justin
January 11, 2003, 10:37am Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,075
Gender: Male
Posts Per Day: 6.52
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 23 hours 27 minutes
Location: Tallassee, AL
Age: 22
That sites more involved in PHP, and other server side scripts ... but yeah, good site none-the-less. Go to their forums if you'd need help. I had to use them not too long ago because of a reg-ex (I think I am getting them now though. ).


- Justin


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  |  MinistryTalk.com  |  Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV

Logged Offline
Site Site Private Message Private message Reply: 9 - 21
importracer
January 12, 2003, 4:20am Report to Moderator Report to Moderator
E-Blah Member
Posts: 90
Posts Per Day: 0.04
I actually think I figured out an easy way to do this. Simply copy all the BoardIndex.pl code into the portal.pl file under sub MainMenu and take out the sections that I don't want displayed.
Logged Offline
Site Site Private Message Private message Reply: 10 - 21
importracer
January 12, 2003, 7:09am Report to Moderator Report to Moderator
E-Blah Member
Posts: 90
Posts Per Day: 0.04
Ok, I actually got this menu working exactly the way I want it but now everyone shows up three times on the boards.
Logged Offline
Site Site Private Message Private message Reply: 11 - 21
importracer
January 12, 2003, 5:19pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 90
Posts Per Day: 0.04
Here is the code that I used just incase someone out there can help me with this issue.

Code
sub MainMenu {
   my($moderate,$bp,$bt);
   $gdisable = 1;
   $title = $mbname;
   &header;
   print <<"EOT";

<table cellpadding="4" cellspacing="1" bgcolor="$color{'border'}" width="100%">
<tr>
  <td width="100" height="11" bgcolor="$color{'titlebg'}"><font color="#FFFFFF" size="2">&nbsp;</font></td>
EOT
   fopen(FILE,"$prefs/Active.txt");
   @activelist = <FILE>;
   fclose(FILE);
   $activecnt = @activelist;
   chomp @activelist;
   $hidec = 0;
   $memcnt = 0;
   $gcnt = 0;

   for($i = 0; $i < @memgrps; $i++) {
      if($i > 6) { ($t,$t,$t,$t,$t,$t,$t,$memgrpp[$i]) = split(",",$memgrpp[$i]); }
      $gcolors{$memgrps[$i]} = $memgrpp[$i];
   }

   foreach(@activelist) {
      ($luser,$ltime,$hidden,$t,$bview) = split(/\|/,$_);
      loaduser($luser);
      if($userset{$luser}->[1] eq '') { $fndu = $luser; } else { $fndu = $userset{$luser}->[1]; }
      push(@quicksort,"$fndu|$luser|$hidden|$bview");
   }
   foreach(sort{lc($a) cmp lc($b)} @quicksort) {
      ($t,$luser,$hidden,$bview) = split(/\|/,$_);
      if($userset{$luser}->[1] ne '') {
         $lostuser = $gcolors{$userset{$luser}->[4]} ? qq~<font color="$gcolors{$userset{$luser}->[4]}"><b>$userset{$luser}->[1]</b></font>~ : qq~$userset{$luser}->[1]~;
         if($hidden) {
            ++$hidec;
            if($settings[4] eq 'Administrator') { $memberson .= qq~<a href="$scripturl,v=profile,a=view,u=$luser">$lostuser</a>, ~; }
               else { next; }
         } else {
            ++$memcnt;
            $memberson .= qq~<a href="$scripturl,v=profile,a=view,u=$luser">$lostuser</a>, ~;
         }
      } else { ++$gcnt; $glog .= "$luser, "; }
      ++$B{$bview};
   }

   $bcnt = 0; $bp = 0; $bt = 0; $catcnt = 0;

   if($username ne 'Guest') {
      fopen(FILE,"$members/$username.log");
      @logged = <FILE>;
      fclose(FILE);
      chomp @logged;
   }
   if($settings[33]) { $link = "$surl,v=mindex,n=1,b="; } else { $link = "$surl,v=mindex,b="; }

   foreach(@catbase) {
      ($nme,$id,$memgrp,$input) = split(/\|/,$_);
      if($memgrp ne '') {
         $con = '';
         @mgrps = split(",",$memgrp);
         foreach $grp (@mgrps) { if($grp eq $settings[4]) { $con = 1; } }
         if($con eq '' && $settings[4] ne 'Administrator') { next; }
      }
      print <<"EOT";
<tr>
  <td bgcolor="$color{'catbg'}" colspan="5"><font size="1"><b> $nme</b></font></td>
</tr>
EOT
      if($input ne '') { @cats = split("/",$input); } else { next; }
      foreach $cat (@cats) {
         $lastuser = '';
         $tdate = '';
         $fnd = 0;
         chomp $cat;
         $bid = $cat;
         foreach $srch (@boardbase) {
            ($id,$binfo[0],$binfo[1],$binfo[2],$binfo[3],$binfo[4],$binfo[5],$binfo[6]) = split("/",$srch);
            if($id eq $cat) { $fnd = 1; last; }
         }
         if(!$fnd) { next; }
         fopen(FILE,"$boards/$bid.ino");
         @binf = <FILE>;
         fclose(FILE);
         chomp @binf;
         $moderate = '';

         @mods = split(/\|/,$binfo[1]);
         &Mods;

         $icon = '';
         fopen(FILE,"$boards/$bid.msg");
         while(<FILE>) {
            chomp;
            ($t,$mtitle,$t,$t,$t,$t,$t,$icon,$lastdate,$lastuser) = split(/\|/,$_);
            last;
         }
         fclose(FILE);

         $tdate = get_date($lastdate);
         $found = 0;
         if($username ne 'Guest') {
            foreach $log (@logged) {
               ($lboard, $lasttime) = split(/\|/,$log);
               if($lboard eq $bid || $lboard eq 'AllBoards') {
                  $isnew = $lasttime-$lastdate;
                  if($isnew >= 0) { $found = 1; }
                  last;
               }
            }
         }
         if($username eq 'Guest' || $found || $lastdate eq '') { $new = 'off'; $alt = $boardindex[9]; }
         elsif(!$found) { $new = 'on'; $alt = $boardindex[10]; }
         $isnew = '';
         $mtit = '';
         loaduser($lastuser);
         if(!$binf[0]) { $binf[0] = 0; }
         if(!$binf[1]) { $binf[1] = 0; }
         if($userset{$lastuser}->[1]) { $lpby = qq~<a href="$scripturl,v=profile,a=view,u=$lastuser">$userset{$lastuser}->[1]</a>~; }
            else { $lpby = $lastuser; }

         $mtitle = CensorList($mtitle);

         $lpin = $mtitle ne '' ? qq~<b><a href="$surl,b=$bid,v=display,m=latest">$mtitle</a></b>~ : $gtxt{'13'};
         $lastpost = $lpby ne '' ? qq~$tdate $boardindex[11] $lpby $boardindex[12] $lpin~ : $gtxt{'13'};

         # Most recent post
         if($max < $lastdate) { $max = $lastdate; $lasttopic = qq~<a href="$surl,b=$bid,v=display,m=latest">$boardindex[13] -› $mtitle</a>~; }

         if($binfo[3] == 3 || $binfo[4] == 3) { $new = "locked"; }

         $posts = MakeComma($binf[1]);
         $topics = MakeComma($binf[0]);
         $binfo[1] = '';
         $message = $binfo[0];
         $message =~ s/&#47;/\//gsi;
         &BC;
         print <<"EOT";
<tr>
  <td bgcolor="$color{'win2'}" valign="top"><font size="1"><a href="$link$bid">$binfo[2]</a></font></td>
</tr>
EOT
         $bp = $binf[1]+$bp;
         $bt = $binf[0]+$bt;
         ++$bcnt;
      }
      ++$catcnt
   }
   if($bcnt == 0) {
      print <<"EOT";
<tr>
  <td bgcolor="$color{'win'}" align="center" colspan="5"><font size="2"><b>$boardindex[14]</b></font></td>
</tr>
</table><br>
EOT
   }

}
1;
Logged Offline
Site Site Private Message Private message Reply: 12 - 21
importracer
January 12, 2003, 11:38pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 90
Posts Per Day: 0.04
Thought that my MemberInfo section could be useful to track this issue too.

Code
sub MemberInfo {
      print <<"EOT";
  <table cellpadding="4" cellspacing="1" bgcolor="$color{'border'}" width="100%">
    <tr>
    <td bgcolor="$color{'titlebg'}" colspan="2"><font color="#FFFFFF" size="2"><b><img src="$images/profile_sm.gif"> $boardindex[32]</b></font></td>
    </tr>
EOT
   fopen(FILE,"$members/LastMem.txt");
   @lm = <FILE>;
   fclose(FILE);
   chomp @lm;
   if($lm[1] > 1) { $s = 's'; $are = 'are'; } else { $are = 'is'; }

   $memberson =~ s/, \Z//i;
   $glog =~ s/, \Z//i;
   if($settings[4] ne 'Administrator') { $glog = ": $gcnt"; }
   elsif($gcnt == 0) { $glog = ": <i>$boardindex[46]</i>"; }
      else { $glog = " ($gcnt): $glog"; }
   if($memberson eq '') { $memberson = "<i>$boardindex[46]</i>"; }

   fopen(FILE,"$prefs/MaxLog.txt");
   @maxlogged = <FILE>;
   fclose(FILE);
   chomp @maxlogged;
   $maxtime = get_date($maxlogged[1]);

   loaduser($lm[0]);
   $allcnt = $gcnt+$hidec+$memcnt;
   if($hidec > 0) { $memcnt .= " $boardindex[33], $hidec $gtxt{'27'}"; }
   print <<"EOT";
    <tr>
    <td bgcolor="$color{'win'}" align="center" width="33"><img src="$images/online.gif"></td>
    <td bgcolor="$color{'win'}"><font size="1"><u><b>$boardindex[34] ($allcnt $boardindex[47])</u></b><br>
    $var{'83'} ($memcnt): $memberson<br>
    $boardindex[35]$glog
EOT
   if($whereis) { print qq~<br><b>» <a href="$scripturl,v=whereis" title="$boardindex[36]">$boardindex[37]</a> «</b> $boardindex[38]~; }
   print <<"EOT";
    </font>
    </td>
    </tr>
    <tr>
    <td bgcolor="$color{'win2'}" align="center"><img src="$images/guest.gif"></td>
    <td bgcolor="$color{'win2'}"><font size="1">$boardindex[39] $lm[1] $boardindex[40]<a href="$scripturl,v=profile,a=view,u=$lm[0]">$userset{$lm[0]}->[1]</a>!<br>
    <b>» <a href="$scripturl,v=members" title="$var{'83'}">$boardindex[37]</a> «</b> $boardindex[42]<br></font></td>
    </tr>
    <tr>
    <td bgcolor="$color{'win'}" colspan="2"><font size="1"><b>» </b>$boardindex[43] <b>$maxtime</b>, $boardindex[44] <b>$maxlogged[0]</b> $gtxt{'4'}.</font></td>
    </tr>
  </table><br>
EOT
}
Logged Offline
Site Site Private Message Private message Reply: 13 - 21
importracer
January 13, 2003, 12:34am Report to Moderator Report to Moderator
E-Blah Member
Posts: 90
Posts Per Day: 0.04
This isn't a real issue for me anymore, I just took all of the MemberInfo on my off of my portal, but I would still like to fix this incase someone else wants to use the MemberInfo on the Portal.
Logged Offline
Site Site Private Message Private message Reply: 14 - 21
2 Pages 1 2 » Recommend Thread
Print

E-Blah Community    Technical Support    Question and Answer  ›  Menu for Portal