>>  Site Map >>  Forums >>  Blocks

Forum module - topics in forum:



Blocks - Having problems with a block? Code doesn't work, get help here.



magic block / appear / dissappear

hi there

just wondering if its possible to only display a specific block if a user or anonymous person is viewing profile:
http://www.sitename.com/modules.php?name=Your_Account&op=userinfo&username=chris

otherwise if the user is viewing another page like forums, the block will not show up.. ?\

thanks Smile






OK I don't think I am totally understanding you here.

But.... If you want a block for only anonymous people to view in blocks/administration set the particular block to anonymous only.






i know you can set that in the blocks admin config.. thats not what i mean.
sorry for not explaining it clearly... i have a weird way of explaining things.. i apologize


ok lets say i have blocks-ProfilePics.php activated... i only want that block to show up if someone goes to a particular page on my site

like if someone goes to
http://www.mysite.com/modules.php?name=Your_Account&op=userinfo&username=chris
which shows the profile page for that member "chris" i want the blocks-ProfilePics.php block to show up

but

if someone is viewing the main page (http://www.mysite.com/index.php) or any other page on the site i dont want that block (blocks-ProfilePics.php) to show up

is that better? if not ill post the links to my site and you'll see what i mean.
thanks Smile






OK I understand now and to my knowledge his configuration is not possible.






ok what about this....

i use this code to figure out the info on the user thats logged in:
Code: :
   $result = $db->sql_query("SELECT * FROM ".$user_prefix."_cnbya_field");
   while ($sqlvalue = $db->sql_fetchrow($result)) {
     list($value) = $db->sql_fetchrow( $db->sql_query("SELECT value FROM ".$user_prefix."_cnbya_value WHERE fid ='$sqlvalue[fid]' AND uid = '$userinfo[user_id]'"));
   
     $userinfo[$sqlvalue[name]] = $value;
      }

how do i figure out the info on the profile_user that im viewing .. lets say his username is "bob" ??

thanks






You keep going back and forth and in circles and have completely lost me first you ask if it is possible to have a block display on a certain page. (which I have already told you that this configuration wasn't possible.

Now you are pasting sql queries from the cynba your account mod with no rhyme or reason as to why. WHY???






i am using the your account mod.. and i modified the profile part of it ..

i have it setup so that users can upload pics and it will show up on their profile.. but i want their thumbnail profile-pictures to show up on one of my left blocks when someon goes to that users profile page.. thats all..

but its messed up right now cuz the way i have it now is if your logged into your own account, and you try to view someone elses profile.. the block will show YOUR profile pics and not the profile your viewing..






Check out this post on ravens site. I think it might help you out a bit.






yeah.. thx for the link but that didnt really help

but i figured it out myself.. so if anyone wants to know:

Code: :

if (($_GET['op']) == "userinfo") {
// display if someone goes to "http://www.site.com/modules.php?Your_Account&op=userinfo
} else {
// display if someone goes to any other page on the site
}





Attention! You are currently viewing sitemap page!
We strongly suggest to look at original content

Search from web

Valid HTML 4.01 Valid CSS