auto glossary/dictionary? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: auto glossary/dictionary? (/showthread.php?tid=49652) |
auto glossary/dictionary? - El Forum - 02-27-2012 [eluser]michaelh99[/eluser] I've searched but run into too many false hits. Does anyone have any suggestions for the most efficient way to implement glossary/dictionary link replacement for the final page output? I'd like to do db lookups based on final output and replace various words with links to a glossary that's maintained on my site. auto glossary/dictionary? - El Forum - 02-27-2012 [eluser]Aken[/eluser] Perhaps a custom base controller (MY_Controller) and the _output() method would be of use to you? auto glossary/dictionary? - El Forum - 03-02-2012 [eluser]michaelh99[/eluser] I think now that my question was pre-Flu (which I'm going through now) induced silliness. I have well-defined fields which I'd like to 'glossarize' so having an arbitrary hook or post controller call would be overkill. I just need to pass the text I'll be showing the user through the same sort of linkification type of function that I do now, only looking for words in the online glossary and replacing with anchor tags. auto glossary/dictionary? - El Forum - 03-02-2012 [eluser]Aken[/eluser] Yeah it's more difficult to do on a whole-page basis instead of a chunk of specific content. You could include that functionality in a library, helper, or if you use some sort of template system (like Smarty or similar), you can create a plugin thought the template system ("modifier" as its known in Smarty lingo). That's what I did when I wanted to process some Markdown text. |