The Ottoman
03-01-2010, 12:29 AM
A little bit of background here to help with my question:
I am planning on creating some forums that, by default are not visible on the forumdisplay template, but are accessable based on usergroup membership (ie: if UserX is a member of usergroup #12 they have access to forum #9).
That part is easy as it's simple forum permissions.
What I would like to do is create a forumblock that displays an image (in this case a treasure map) that has been coded so that the user can get to the forum by clicking a link within the image (a simple imagemap), which is where I am in the coding aspect.
My imagemap is as follows:
<div class="imgmap_css_container" id="imgfile">
<a style="position: absolute; top: 115px; left: 250px; width: 12px; height: 12px;" alt="Secret Forum 1" title="" href="http://mysite.com/forum/forumdisplay.php?f=9" target="_top" >
<em>
</em>
</a>
<a style="position: absolute; top: 109px; left: 102px; width: 12px; height: 12px;" alt="Secret Forum 2" title="" href="mysite.com/forum/forumdisplay.php?f=10" target="_top" >
<em>
</em>
</a>
<a style="position: absolute; top: 81px; left: 300px; width: 10px; height: 10px;" alt="Secret Forum 3" title="" href="mysite.com/forum/forumdisplay.php?f=11" target="_self" >
<em>
</em>
</a>
<a style="position: absolute; top: 270px; left: 37px; width: 10px; height: 10px;" alt="Secret Forum 4" title="" href="mysite.com/forum/forumdisplay.php?f=11" target="_blank" >
<em>
</em>
</a>
</div>
That would have four locations on the image that are hyperlinked to four different locations.
Would I be correct in thinking that if I used this code:
if (is_member_of($vbulletin->userinfo, 12)) {
the code above
} else {
display some other image
}
And then additionally, would it be safe to assume that this would be correct as well:
if (is_member_of($vbulletin->userinfo, 12)) {
the code above
} else
if (is_member_of($vbulletin->userinfo, 13)) {
display image#2
} else
if (is_member_of($vbulletin->userinfo, 14)) {
display image#3
}
Thanks for your assistance.
I am planning on creating some forums that, by default are not visible on the forumdisplay template, but are accessable based on usergroup membership (ie: if UserX is a member of usergroup #12 they have access to forum #9).
That part is easy as it's simple forum permissions.
What I would like to do is create a forumblock that displays an image (in this case a treasure map) that has been coded so that the user can get to the forum by clicking a link within the image (a simple imagemap), which is where I am in the coding aspect.
My imagemap is as follows:
<div class="imgmap_css_container" id="imgfile">
<a style="position: absolute; top: 115px; left: 250px; width: 12px; height: 12px;" alt="Secret Forum 1" title="" href="http://mysite.com/forum/forumdisplay.php?f=9" target="_top" >
<em>
</em>
</a>
<a style="position: absolute; top: 109px; left: 102px; width: 12px; height: 12px;" alt="Secret Forum 2" title="" href="mysite.com/forum/forumdisplay.php?f=10" target="_top" >
<em>
</em>
</a>
<a style="position: absolute; top: 81px; left: 300px; width: 10px; height: 10px;" alt="Secret Forum 3" title="" href="mysite.com/forum/forumdisplay.php?f=11" target="_self" >
<em>
</em>
</a>
<a style="position: absolute; top: 270px; left: 37px; width: 10px; height: 10px;" alt="Secret Forum 4" title="" href="mysite.com/forum/forumdisplay.php?f=11" target="_blank" >
<em>
</em>
</a>
</div>
That would have four locations on the image that are hyperlinked to four different locations.
Would I be correct in thinking that if I used this code:
if (is_member_of($vbulletin->userinfo, 12)) {
the code above
} else {
display some other image
}
And then additionally, would it be safe to assume that this would be correct as well:
if (is_member_of($vbulletin->userinfo, 12)) {
the code above
} else
if (is_member_of($vbulletin->userinfo, 13)) {
display image#2
} else
if (is_member_of($vbulletin->userinfo, 14)) {
display image#3
}
Thanks for your assistance.