Previous Thread
Next Thread
Print Thread
Rate Thread
#315034 07/29/2007 3:38 PM
Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
This is one of many ajax mods/additions that I have in the hopper. Since this was the easiest, I figured I would pump this one out first.

What this does is use the existing showmember functionality and bolt on an ajax based textbox. So regardless of how the searchmember might change in look/feel, this should just tag right along. (that is of course if there's ajax added in the future)

When you hit the 'User List', the standard stuff comes up, with an added text box:

[Linked Image]

as you start typing in the text box, a drop down list will be filled with those members who match the characters as typed.

it will refine itself as you type more characters:

[Linked Image]

you can mouse out and the pull-down will hide itself. you can mouseover the textbox again and (if there was text typed) the menu will re-appear.

Of course, you can scroll down to a specific user and click. This will take you to the members profile as the current search does for member name clicks.

There are new files added and only slight mods to the core code, so it should be easy to implement.

Read the readme, grab the .zip and have at it.

Enjoy!

SD
Attachments
2460-ReadMe.txt (1.82 KB, 46 downloads)
Prolly should read this ;)
SHA1: b3b0e2a03af87b96a8b61d6cf397c1275568f6fd
2461-ajaxSearchMember.zip (61.62 KB, 26 downloads)
El zippo of the stuff.
SHA1: 1237ee8b4ab5b5488d08c1b2c31eab62879242e6

Sponsored Links
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
Looks great old timer wink


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Sure does, time to try it out smile


- Allen wavey
- What Drives You?
Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
this mod comes indirectly from Allen, because he got me looking at Zend Framework 1.0 stuff. They then pointed the way to the prototype/scritaculous stuff and it then got implemented.

ty Allen wavey

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
i'm not satisfied with the mod.. i will be changing over to yui, which fixes some obscure safari bug for getXY and static positioning..

so, i'd hold your horses on it for now..

film @ 11

Sponsored Links
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
Originally Posted by sirdude
so, i'd hold your horses on it for now..


My horse got away, so I tried it anyway.

I ended up with this when editing the showusers template.

Parse error: syntax error, unexpected T_ENDFOR in /home/themeparknl/html/themepark.nl/ubb/templates/compile/%%CC^CC7^CC738990%%showmembers.tpl.php on line 183

also, the zip file has ubbt_js/ajax as a path, shouldn't that be ubb_js/java ?

Last edited by blaaskaak; 09/02/2007 4:38 PM.
Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
no, it should be /ubbt_js/ajax

and you mean the showmembers template ? hrm...

i can look @ the .zip and maybe see if i did a typo. i have it working fine on 2 heavily used sites..

smile

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
your tpl (fragment) should look something like this when done edit:

Code
{$tbopen}
<tr>
<td align="center" class="tdheader">
{$sortlinks}
</td>
</tr>
{$tbclose}

<br />

<span style="float:right">
{$pages}
</span>

{* SD - Mod: ajax search *}
<div id="search">
{$lang.AJAX_USER_SEARCH}
<div id="topleft" style="display:inline;">
<input type="text" name="user" id="user" class="form-input" autocomplete="off" />
<div id="suggest"></div> </div>
</div>

<div style="clear:both"></div>

no ?

what version you applying this to ?

Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
Originally Posted by sirdude
your tpl (fragment) should look something like this when done edit:

THat's the way it looks.

Originally Posted by sd
what version you applying this to ?


7.2.2.blaaskaak

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
hrm. works fine for both boards i have it running on..

since you are quite knowledgable, i even hesitate to ask if you deleted the compiled version, so it could recompile ?

laugh

otherwise.. weirdness .. hrm... frown

must be a Dutch thing !! laugh laugh

my compiled template goes to line 176 .. i'm interested in what you have on line 183.. it's just php code.. can you paste the last part of the file in here ?

ty

Sponsored Links
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
Code
<div class="ubbcode-block"><div class="ubbcode-header">Originally Posted by sirdude</div><div class="ubbcode-body">since you are quite knowledgable, i even hesitate to ask if you deleted the compiled version, so it could recompile ?</div></div><br><br>I don't really bother with that most of the time <img src="<<GRAEMLIN_URL>>/smile.gif" alt="smile" title="smile" height="15" width="15" /> As long as the date is newer, it will recompile itself. I've test this and never failed me yet. But in this case I happened to try that again.<br><br><div class="ubbcode-block"><div class="ubbcode-header">Quote</div><div class="ubbcode-body">my compiled template goes to line 176 .. i'm interested in what you have on line 183.. it's just php code.. can you paste the last part of the file in here ?</div></div> <br><br><span style="font-style: italic"><?php echo $this->_tpl_vars['userrow'][$this->_sections['user']['index']]['Reged']; ?><br><br></td><br></tr><br><br><span style="font-weight: bold"><?php endfor; endif;  echo $this->_tpl_vars['tbclose']; ?></span><br><br><br><span style="float:right"><br><?php echo $this->_tpl_vars['pages']; ?><br><br></span></span><br><br><span style="font-weight: bold">boldie</span> is line 183.<br><br>I will try it on a clean install tonight, but I don't remember too much hacks on this file.

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
your tpl and mine are different.

i think you are missing a {/if} somewhere or whatever.. must be one of your other mods to that file?

mine has
PHP Code

<?php endfor; endif; ?>
<?php
echo $this->_tpl_vars['tbclose']; ?>


<span style="float:right">
<?php echo $this->_tpl_vars['pages']; ?>

</span>


for last lines wink

Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
Originally Posted by sirdude
i think you are missing a {/if} somewhere or whatever.. must be one of your other mods to that file?


I don't care about one mod more or less, I kind of forgot if I adjusted anything there, but I checked with the original, and my template was as fresh as a newborn baby.

Will fix my testboard, so that it is out of the box again (gotta love wanting to have a clean testboard, and still ending up with a modded testboard wink ) and test it there.

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
slowly, but surely the good mods make it into core.. sooooo, less work for you over time tipsy

Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
okay, thanks for the tip. I'll prefix my new mods with [good mod] smile

No errors on the testboard so far.

Joined: Nov 2003
Posts: 482
Enthusiast
Enthusiast
Offline
Joined: Nov 2003
Posts: 482
what, you think i have a time-delay bug in there ? laugh


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)