View Single Post
  #1553  
Old 11-29-2006, 11:16 AM
Greek Wizard Greek Wizard is offline
 
Join Date: Jun 2006
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had this working fine on a different forum (3.5.4) and it worked pretty good.

When I created a new site, I was hoping to have this as a perk/premium for VIP members, etc.

After reading everything over, I have installed it fine on a 3.6.4 board, and all works well.

However today one of my members told me there was an issue with the buddy/ignore screen, and that the Journal buddies was "trapped" inside the Ignore users box. I guess when I modified the MODIFYLIST template, I stuck the code in the wrong place and it was causing issues with my ignore user functions.

I now see that much of the code it's looking for does not exist in my style (unsure of default 3.6), so i must have spaced out and installed it close to what I think it was.

The instructions say:

Code:
   In Template modifylist
   FIND
   ----------------------------------------------------------------------------------------------------------------------------------
					<form action="profile.php" method="post">
					<input type="hidden" name="s" value="$session[sessionhash]" />
					<input type="hidden" name="do" value="updatelist" />
					<input type="hidden" name="userlist" value="ignore" />					
					<fieldset class="fieldset">
						<legend>$vbphrase[ignore_list]</legend>
						<div style="padding:$stylevar[formspacer]px">
							$ignore_listbits
							<div><input type="text" class="bginput" name="listbits[]" size="25" /></div>
							<div><input type="text" class="bginput" name="listbits[]" size="25" /></div>
						</div>
						<div align="center"><input type="submit" class="button" value="$vbphrase[update_ignore_list]" accesskey="s" /></div>
					</fieldset>					
					</form>				
				</td>
			</tr>
   ----------------------------------------------------------------------------------------------------------------------------------


   BELOW that ADD
   ----------------------------------------------------------------------------------------------------------------------------------
   <tr>
   <td>
   <form action="profile.php" method="post">
   <input type="hidden" name="s" value="$session[sessionhash]" />
   <input type="hidden" name="do" value="updatelist" />
   <input type="hidden" name="userlist" value="jbuddy" />					
   <fieldset class="fieldset">
   	<legend>$vbphrase[journal_buddy_list]</legend>
	<div style="padding:$stylevar[formspacer]px">
		$jbuddy_listbits
		<div><input type="text" class="bginput" name="listbits[]" size="25" /></div>
		<div><input type="text" class="bginput" name="listbits[]" size="25" /></div>
	</div>
	<div align="center"><input type="submit" class="button" value="$vbphrase[update_journal_buddies]" accesskey="s" /></div>
   </fieldset>					
   </form>				
   </td>
   </tr>
   ----------------------------------------------------------------------------------------------------------------------------------
Anyways, I guess I had to fix it.

I looked it over and decided that I didn't like the one that was there anyways.

So i created my own:

In MODIFYLIST find:

Code:
<script type="text/javascript">
								<!--
								vbmenu_register('userfield_buddy', true);
								snc_buddy = new vB_AJAX_NameSuggest('snc_buddy', 'userfield_buddy_txt', 'userfield_buddy');
								//-->
								</script>
							</if>
						</td>
						<td align="$stylevar[right]"><input type="submit" class="button" value="$vbphrase[save_list]" accesskey="s" /></td>
					</tr>
					<tr>
						<td colspan="2"><label for="chkall_b"><input type="checkbox" name="allbox" id="chkall_b" onclick="js_check_all(this.form)" checked="checked" />$vbphrase[check_uncheck_all]</label></td>
					</tr>
					</table>
					
				</fieldset>
				</form>
			</div>
			</if>
Replace with:

Code:
<script type="text/javascript">
								<!--
								vbmenu_register('userfield_buddy', true);
								snc_buddy = new vB_AJAX_NameSuggest('snc_buddy', 'userfield_buddy_txt', 'userfield_buddy');
								//-->
								</script>
							</if>
						</td>
						<td align="$stylevar[right]"><input type="submit" class="button" value="$vbphrase[save_list]" accesskey="s" /></td>
					</tr>
					<tr>
						<td colspan="2"><label for="chkall_b"><input type="checkbox" name="allbox" id="chkall_b" onclick="js_check_all(this.form)" checked="checked" />$vbphrase[check_uncheck_all]</label></td>
					</tr>
					</table>
					
				</fieldset>
				</form>
			</div>
			</if>
			<div id="userfield_buddy_div">
				<form action="profile.php" method="post">
				<input type="hidden" name="s" value="$session[sessionhash]" />
				<input type="hidden" name="do" value="updatelist" />
				<input type="hidden" name="userlist" value="jbuddy" />					
				<fieldset class="fieldset">
					<legend>$vbphrase[journal_buddy_list]</legend>
					
					<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
					<tr valign="top">
						<td>$jbuddy_listbits</td>
					</tr>
					</table>
					
					<br />
					
					<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" style="display:none">
					<tr valign="top">
						<td><img src="$stylevar[imgdir_statusicon]/wol_error.gif" alt="" /></td>
						<td id="userfield_buddy_errortext">&nbsp;</td>
					</tr>
					</table>
					
					<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
					<tr valign="bottom">
						<td>
							<div>$vbphrase[add_new_user_to_list]</div>
							<div><input type="text" class="bginput" name="listbits[]" id="userfield_buddy_txt" size="45" value="$userinfo[username]" autocomplete="off" /></div>
							<if condition="$show['popups']">
								<div class="vbmenu_popup" style="display:none"></div>
						</td>
						<td align="$stylevar[right]"><input type="submit" class="button" value="$vbphrase[save_list]" accesskey="s" /></td>
					</tr>
					<tr>
						<td colspan="2"><label for="chkall_j"><input type="checkbox" name="allbox" id="chkall_j" onclick="js_check_all(this.form)" checked="checked" />$vbphrase[check_uncheck_all]</label></td>
					</tr>
					</table>
					
				</fieldset>
				</form>
			</div>
			</if>
Please save your modifylist template first, just in case, because I am not a coder by any means, i simply hack away, so please be gentle, it might not work for you (it should though)

The results are in the attached image

if anyone thinks they can improve on it (and they probably can), feel free. All i did was copy the buddies section, and edited it out as needed

However this is where I need some very small help.

When you add a username to the buddy or ignore list, the name is defaulted as checked, therefore next time you add names, they will remain on the list.

In my changes above, when I add a user, it is defaulted unchecked. if you press the check / uncheck all button it works fine. Can anyone help me fix this small issue?

Also, on the /journal.php?do=showjbuddies page, all the user names are stuck together 9no spaces between them)

i know both are related to $jbuddy_listbits but when i search the journal.php, I can't really figure it out much.

Can anyone interested in fixing this buddy page help me out on these two minor issues?

thanks
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01201 seconds
  • Memory Usage 1,803KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete