181
khuhner
Re: Conditional Code for "Administration Menu Link"
  • 2006/2/3 1:04

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


All-

Thanks for the input! Putting together ideas from this thread, the other linked thread and trial-and-error, here is the code. I had to add 'echo' statements, and it took 30 minutes to see the single tick after the "href="!!!

Thanks again,
Kurt




Quote:

global $xoopsUser;
echo "<li><a href='".XOOPS_URL."user.php'>View My Account</a></ li>";

echo "<li><a href='".XOOPS_URL."edituser.php'>Edit My Account</a></ li>";
echo "<li><a href='".XOOPS_URL."viewpmsg.php'>Private Messages</a></ li>";
echo "<li><a href='".XOOPS_URL."notifications.php'>Notifications</a></ li>";
echo "<li><a href='".XOOPS_URL."modules/xoopsmembers'>Search Members</a></ li>";

if ( is_object( $xoopsUser ) && $xoopsUser->isAdmin() )
{
echo "<li><a href='".XOOPS_URL."admin.php'>Administration</a></li>";
}
echo "<li><a href='".XOOPS_URL."user.php?op=logout'>Logout</a></li>";




182
khuhner
Re: Conditional Code for "Administration Menu Link"
  • 2006/2/2 23:46

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


Thanks for the quick response! I read (and reread) this thread. It seems as if people are "trying this and that." I cant see a clear answer....?

I created a custom block using the Admin interface (I copied all the code from the block into my post above).
I have it set to HTML type. I just want to have a few links in it....nothing "fancy!"

I must be doing something very silly here...



183
khuhner
Conditional Code for "Administration Menu Link"
  • 2006/2/2 23:16

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


I have a custom built block where I have inserted the 'user' type functions (View Account, Edit Account, etc.). I have added the Administration link, however I'd like to wrap it in conditional code so the menu only appears if the current user IS an Administrator.

I have tried numerous approaches and cant seem to find the right one. My latest code is below. Can anyone assist?

<?php
include("../../mainfile.php");
include(
XOOPS_ROOT_PATH."/header.php");
$xoopsOption['show_rblock'] = 1;
?>

<li><a href={X_SITEURL}user.php>View My Account</a></li>

<li><a href={X_SITEURL}edituser.php>Edit My Account</a></li>

<li><a href={X_SITEURL}viewpmsg.php>Private Messages</a></li>

<li><a href={X_SITEURL}notifications.php>Notifications</a></li>

<li><a href={X_SITEURL}modules/xoopsmembers>Search Members</a></li>

<?php
<{if $xoopsUserIsAdmin}>

echo 
"<li><a href={X_SITEURL}admin.php>Administration</a></li>";
<{/if}>
?>

<li><a href={X_SITEURL}user.php?op=logout>Logout</a></li>



184
khuhner
Re: Rank Images...
  • 2006/2/2 19:29

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


<bump again> Anybody? XOOPS Team Developers?



185
khuhner
Re: Rank Images...
  • 2006/1/31 13:54

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


<bump>, <bump>



186
khuhner
Re: Rank Images...
  • 2006/1/26 2:07

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


I have the SAME problem on XOOPS 2.0.13.2.

To take it a step further, try to just ADD a rank with an image. That fails. Checking the database, all the data is there minus the image mangled name.

Can any of the XOOPS System module developers help out?



187
khuhner
Re: buttons!
  • 2006/1/25 17:46

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


Quote:

also tried (as read in a forum post):
<{$xoops_url}>/content/test.html

but it always trys to open:
/modules/multiMenu/<{$xoops_url}>/content/test.html

and if i use:
../../content/test.html

then it opens it in a new window.

apparently it doesnt recognize the <{$xoops_url}>
for some reason


I've had the SAME issue with a custom block. Anyone know what code to put into a custom block to render the proper directory prefix?



188
khuhner
Re:getting hidden fields to accept default values
  • 2006/1/23 0:46

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


I have the SAME problem! What did you do to resolve it?

I commented out the 1016 code segment, which prevents the error, but now the file that was uploaded cant be read...



189
khuhner
iContent 4.5 Losing HTML in Pages FREQUENTLY
  • 2006/1/21 17:09

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


I wanted a straight forward content management module for two reasons.

(1) Simple so non-technical types can modify pages
(2) I didnt need a bunch of 'options'

So installed iContent 4.5 on XOOPS 2.0.13.2. Everything works OK (besides the poor navigation layout) with ONE HUGE EXCEPTION!!!!

The WYSIWIG editor frequently loses ALL THE HTML code for my page!!! I've had to reenter so many of them I now have them saved locally so when iContent loses them I reload them.

And here's the 2nd problem. You CANT just copy-and-paste HTML code into the HTML portion of your doc and save. Why? iContent loses all your HTML code!!!

Anyone else have this problem? I tried the authors site, but it's a pity that its ALL IN FRENCH! What's up wih that? I thought XOOPS was a multilingual package? S0 if you need support you're probably screwed like me :)

I even downloaded 4.6 Beta from the authors site and it still has the problem....


Has anyone had a similiar problem? Can you assist?



190
khuhner
Re: XoopsChat 1.5 Installation Problem
  • 2006/1/18 23:26

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


I dunno who got this module running! I am using

Xoops 2.0.13.2, MySql 5.0, php 5.

The module errors in the SQL statement file on the INSERT. I hacked to get around it and when the Blocks are used, the module grabs the top part of the screen (i.e. XOOPS 2 logo and any banners used) and shows it partly in the bottom of the chat box???

If you look past that, you cant put any messages into the box as it says "_MI_XCHAT_NOMESSAGES."

Is there at least ONE chat module that works seamlessly with Xoops?????

And yes I've tried MX Chat with equally the amount of grief.




TopTop
« 1 ... 16 17 18 (19) 20 21 »



Login

Who's Online

117 user(s) are online (80 user(s) are browsing Support Forums)


Members: 0


Guests: 117


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits