The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Tried to make a forum block that signs you up for a usergroup. I have the template set to join the group and the join part works but for some reason it will not redirect to the Usergroup Roster Page i have created for that group. Any help will be appreciated. If need be I can post the code for the template too just to make sure I didnt screw anything in there up.
Code:
<a href="/roster.php?roster=EBAFreeAgent" onclick="document.getElementById('EBA').submit();return false;">
<img src='/images/ebasignup/ebasignup.png' width='240px' height='198px' alt=''>
</a>
|
|
#2
|
|||
|
|||
|
So when they click on the link, it should submit a form somewhere...?
It's not clear what you exactly want. Might also want to remove "return false;" in the onclick. |
|
#3
|
|||
|
|||
|
Quote:
Code:
<vb:if condition="$GLOBALS[forumid] == 50"><li>
<div class="block smaller">
<div class="blocksubhead">
<a class="collapse" id="collapse_block_html_{vb:raw blockinfo.blockid}" href="{vb:raw relpath}#top"><img alt="" src="{vb:stylevar imgdir_button}/collapse_40b.png" id="collapseimg_html_{vb:raw blockinfo.blockid}"/></a>
<span class="blocktitle">{vb:raw blockinfo.title}</span>
</div>
<div class="widget_content blockbody floatcontainer">
<div id="block_html_{vb:raw blockinfo.blockid}" class="blockrow">
{vb:raw content}
</div>
</div>
</div>
<div class="underblock"></div>
</li>
<form action="profile.php" method="post" id="EBA">
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="do" value="joingroup" />
<input type="hidden" name="usergroupid" value="197" />
</form>
</vb:if>
|
|
#4
|
|||
|
|||
|
So does anyone see what I did wrong? I am sure I screwed something up. Just looking for a little help. Basically to break it down again. This forum block is displayed in Sidebar Anywhere on a specific forum. Once the individual clicks on the image they are assigned to UG 197 and should be redirected to a Memberlist page with just that UGs members shown that I have already created. The only part of the process that is not working is the redirect. Removing the return false; from the top code stops the UG Join. If anyone can aide me in figuring out what I did wrong please let me know, because this is driving me bonkers.
|
|
#5
|
|||
|
|||
|
In your template code for the link ... shouldn't there be a . in front of /roster.php?
|
|
#6
|
||||
|
||||
|
Or no leading slash.
|
| Благодарность от: | ||
| TheLastSuperman | ||
|
#7
|
|||
|
|||
|
Quote:
|
|
#8
|
|||
|
|||
|
Provide a link to the forum where the forum block is and a link to the roster page.
|
|
#9
|
|||
|
|||
|
http://www.eliteteamplay.com/forumdi...ll-Association
the forum block is to the right. http://www.eliteteamplay.com/roster....r=EBAFreeAgent That is the roster page. |
|
#10
|
|||
|
|||
|
The problem is that the hyperlink has an onclick which submits the form, you can't submit a form and go to a link at the same time. The form has to actually be submitted in order for the form to be processed.
You have to hook into profile_complete and redirect the user to that page when they are sending a request to join a group. |
| Благодарность от: | ||
| TheLastSuperman | ||
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|