PDA

View Full Version : Custom BBcode that returns query results


markp_2000
07-16-2008, 06:22 PM
I would like to have a custom BBcode that returns the results of a query.

For example - I have a list of songs in an external database. I would like to be able to have a tag - Girls - query a database and return the number of songs that have the words Girls in the title.

It would display Girls - (10) where 10 is the results of the query.

Where would the hook fire?
How would I capture or scan the post?

Mark

desie310
09-28-2009, 04:16 AM
I know this is old but I'd like to know the same thing and I can't find anything helpful with extensive searching. I just know it's possible and that I need to mod the class_bbcode.php file. The reference (which gave no details) said it was easy but I've been staring at the file for 2 days and I'm not sure where to add my query.

the custom bbcode I want to use would be something like 45, where "inline" is the type of citation and "45" is the id number of the record to be cited.

Lynne
09-28-2009, 03:11 PM
You'll need to write some code to do that. You can look at the hook location bbcode_create and see what needs to be done. Dismounted has helped a couple of users do this, so you can search on some posts by him.