MyBB Community Forums

Full Version: How can I seach for guest ID using search link
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I placed this code in postbit_author_guest template to give guest an ID#

<font size="2"><b>Guest ID: <?=hexdec(substr(md5($post['ipaddress']), 0, 4))?></b></font>

I added a column in my database mybb_posts that stores the ID# of the guest.

Is there a way to customize the search so user can search for posts made by a certain guest ID#

Thanks,
It isn't a MyCode so I'm moving it to a more appropriate section.

You'd have to either code a plugin or mess around with the search.php file.
(2014-08-06, 08:38 PM)dragonexpert Wrote: [ -> ]It isn't a MyCode so I'm moving it to a more appropriate section.

You'd have to either code a plugin or mess around with the search.php file.

Thanks, I have tried messing around with search.php with no luck.
As you say you have a db field only go to search file and add search my threads and if guest i suppose you take ip value to set your guest id. But you can do a query with search threads where db field id equal to your guest id. If you give the same id works but if dont its very hard to get that search results.
This is what I have done. I edit the inc/datahandlers/post.php file so when a guest posts a new reply or thread it inserts their ID number in mysql under 'guid' her is an image of my mybb_posts.

[Image: guid.png]

If you type the guid number into search it comes up empty. I would like to be able to use the default search and get the same results. I am willing to mod the search.php to get it but I am lost on how to do it. I'm not lazy and I have tried for two days to do it.