Hi im working on a forum and I have alomost finished it but i want a user quote system like twitter and facebook with the @ sign to start it off, however even though im good at php coding and have done a code with preg_match and preg_replace to change them quotes to link.
For example if someone wrote "to quote @123456 which he said this." what would come up is "to quote 123456 which he said this." and the 123456 would be a link to their profile.
I also did the username change and got this to work but when I did that the code only got the first quoted id number and if there was two users quoted in one comment then it would have the same username going to two different profile links.
What I want to do is what facebook does, I want that @123456 link to change to the user's username. Lets say the id "123456" goes to the user "Test User" then the link would be: Code: <a href="http://tester.com/123456">Test User</a>
What I need help with is how to make a function that gets the comment looks through it for each quoted user and looks in the database for that id number and then prints out a link to their profile with the link having their username showing on the page and a link like "http://tester.com/<userid>".
For example if the php function was called "comment" then i would do this:
Code: print comment('to quote @123456 and @654321 which they said this.');
And what prints out on the page is: to quote Test User and Guest User which they said this.
And the html code would be:
Code: to quote <a href="http://tester.com/123456">Test User</a> and
<a href="http://tester.com/654321">Guest User</a> which they said this.
If anyone can help me please reply Thank You.
How can i use [] tags instead of <> tags for profiles??
On my site im making ive made it so u can register, login and u have a profile which u can update..http://90.202.46.253thats the site, if u go on there, regsiter and login u will see that u can then
Gaining access to Drop Down Menu Variable
code is below, I am creating a drop down menu. I want to echo the value selected in the drop down menu in the php file that is executed afterwards. when I echo frmcounty in the php file it returns
PHP form authentication
Hi guys,what am trying to achieve is this: Whenever a user tries to login to my website, an error should be displayed for the first time notifying them to try again. Every time they open the website,
Weekly Calendar
Hi, I am looking at creating a weekly calendar. The calendar will read from Monday - Sunday. Does anyone know of any examples or tutorails on how I can achieve this, as I have tried searching without
Checking if field is empty AND using !is_numeric
Hi lads,Need to be able to display an error message (using isset?) that says "Cant leave field blank" when someone clicks on submit after leaving the field blank. The problem is that I'm
php calculate
this code echoes correctly the sum but the inserted result is 0??Code:
email form (cannot find the problem)
Hello there. I've been having trouble with an email form. Can't find the problem really. I've tested so many times, tried different ifs to see where the problem comes from. It turned out its alway the
Not capturing all the information we require in the form.......
Hi Guys,I was wondering if you would share some more of your knowledge today, I'm hoping it will be quite a simple answer for you but one that is boggling us here! ;-)We have an html form that users
md5 is it unique
I know this is most likely one of many simple questions that can be found semi easily. But I'm pressed for time. I have searched google, php.net, etc. But it only tells me how to make md5 hashes. Ok
Php WordPress help
I am writing the following code for making a plugin<?phpheader("Content-Type: text/css");/*Plugin Name: Name of the plugin.Plugin URI: The page having information related to