130
Quote:
mikelmoore wrote:
Can multimenu support this functionality?
I use a bridged coppermine and would like to be able to provide a submenu option to go directly to the users personal gallery. In order to do that I need to pass the users $uid as part of the link and it will vary with each user.
To fully be a replacement for the default XOOPS menus, there has to be some kind of support for this...
hi,
here is a quick tip. that seems to work.
edit : multiMenu/blocks/block.php
under line 188
Quote:
///////////////////////// Create urls /////////////////////////
replace :
le="color: #000000"><?php // Link url if ($myrow['link']) { // Link Type if ( (eregi("mailto:", $myrow['link'])) || (eregi("http://", $myrow['link'])) || (eregi("https://", $myrow['link'])) || (eregi("file://", $myrow['link'])) || (eregi("ftp://", $myrow['link']))) { $link = $myrow['link']; } else { $link = XOOPS_URL."/".$myrow['link']; }
with :
le="color: #000000"><?php // Link url if ($myrow['link']) { global $xoopsUser; if (is_object($xoopsUser)) { $user_id = $xoopsUser->getVar('uid'); } // Link Type if ( (eregi("mailto:", $myrow['link'])) || (eregi("http://", $myrow['link'])) || (eregi("https://", $myrow['link'])) || (eregi("file://", $myrow['link'])) || (eregi("ftp://", $myrow['link']))) { $link = $myrow['link']; $link = preg_replace('/{user_id}/', $user_id, $link); } else { $link = XOOPS_URL."/".$myrow['link']; $link = preg_replace('/{user_id}/', $user_id, $link); }
then, you can use links such as :
le="color: #000000"><?php userinfo.php?uid={user_id}
which will give this link :
http://www.website.com/userinfo.php?uid=1 (or other uid)
caution : if the visitor is not logged in, and that you leave the link accessible to anonymous, the link will become :
http://www.website.com/userinfo.php?uid=thus, i recommend to you, to make links using this {user_id} tag, to be visible only to connected members.