Firefox PHP

Member List?

Posted by Voltius 
Re: Member List?
February 13, 2011 11:55PM
Phorum now contains the jQuery library. Adding an according plugin is easy.
If you want to let your users more specifically look for users, why don't you add some custom profile fields during registration? These additional profile items will allow them to better target their searches later-on. (Of course you need to add some code.)
Re: Member List?
February 14, 2011 02:01PM
korsakov,
our problem is not how to search more specificly, but the big dropdownlist.
what we want, is an auto-suggest for usernames, when typing a part of a username in a textfield.

we also do not want to upgrade our forum just for using phorum's jQuery, because we normally use a content delivery network for adding jQuery (in our case Google's CDN). Only interested in security patches/upgrades. Our phorum works really perfect, so no need to upgrade:)
The only drawback is the big dropdownlist in the pm system.

The custom profile fields will be added soon, because our old profile system is.....old:)

<hr />
usually manuals are written by experts,
so.....that's the reason why i do not understand the manuals)
Re: Member List?
February 14, 2011 03:18PM
Btw, in case you use Google's CDN there is a module from Maurice that allows you to not load Phorum's jQuery library. This concern should not keep you from upgrading your system!
Re: Member List?
February 28, 2011 11:33PM
I did not got it working, so I tried a more simpler example.
As a standalone page i could retrieve at least the names of prhorumusers. (just as a test, i need their id for sending pm)
But when i added the code to footer.tpl, nothing happens??

Because as a standalone page it works, i just implement it the wrong way.

I just added a form in the footer, trying to get the usernames by partially typing a username.
This is how i did it:

Language: HTML
<div class="PhorumFooterPlug" align="center"> Copyrights by <a href="http://www.xxxxxxxxx.nl">XXXXXXXXXXXXXXX</a> &copy; 2006 - <?php echo date("Y"); ?> <p> <div> <form> <div> testveld, werkt nog niet!!:   <input type="text" size="30" value="" id="inputString" onkeyup="lookup(this.value);" onblur="fill();" /> </div>   <div class="suggestionsBox" id="suggestions" style="display: none;"> <img src="../autocomplete/upArrow.png" style="position: relative; top: -12px; left: 30px;" alt="upArrow" /> <div class="suggestionList" id="autoSuggestionsList"> &nbsp; </div> </div> </form> </div>     </div> {! these are the two div´s from header.tpl } </div> </div>   <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> <script type="text/javascript"> function lookup(inputString) { if(inputString.length == 0) { // Hide the suggestion box. $(';#suggestions';).hide(); } else { $.post("../autocomplete/rpc.php", {queryString: ""+inputString+""}, function(data){ if(data.length >0) { $(';#suggestions';).show(); $(';#autoSuggestionsList';).html(data); } }); } } // lookup   function fill(thisValue) { $(';#inputString';).val(thisValue); setTimeout("$(';#suggestions';).hide();", 200); } </script>       </body> </html>

Nothing happens and firebug did not detect any requests.

Somebody can give me a clue?

<hr />
usually manuals are written by experts,
so.....that's the reason why i do not understand the manuals)
Re: Member List?
March 01, 2011 10:09PM
Found it finally:
used the curls in javascript the wrong way, they do have special means in the template language!!

$.post("../autocomplete/rpc.php", {queryString: ""+inputString+""},

added whitespace after { and before }

$.post("../autocomplete/rpc.php", { queryString: ""+inputString+"" },

Notice the small difference, just 2 whitespaces!!

So for now, i have an input field in my footer, where i can search for an username, by just typing a few characters.

I will now search and puzzle for the next step: get userid too and add it to the recipients list and put the inputfield on the right place or using the original inputfield for it.
Be patient for the solution, i certainly am no hero with javascript!!

<hr />
usually manuals are written by experts,
so.....that's the reason why i do not understand the manuals)
Re: Member List?
March 01, 2011 11:57PM
Got it!

it took me a while, but afterwards it's quit simple to implement it.

I posted my complete ajax solution in my original post here

<hr />
usually manuals are written by experts,
so.....that's the reason why i do not understand the manuals)
Sorry, only registered users may post in this forum.

Click here to login