Honor wrote:Previous question - how would allowing images/bbcodes/links etc work with this? For the signature I mean.
Honor wrote:Hey, there's something I'm trying to accomplish with my forum that I didn't know if you could help me with. What I want to do is find a way for users to be able to specify a sig depending on the forum. So if their post is in a political forum, it would show a political sig, and if it was in a movie forum, it would show a movie sig, etc. I've got a very basic idea of using <!-- IF Forum # --> off of another website, but I neither know how to allow images or bbcodes into the box, nor do I know the exact syntax.
As far as I know, I can do this two ways - one is through the ACP with custom profile fields (would show in a separate place other than the sig section in UCP). The other, and one I definitely do not know how to do, is to change the sig coding itself so it's not only all in one place, but perhaps cleaner?
Again, this is only if you have the time. It would come in really handy for me tho, and I'd like to learn the code/database commands that run with something like this.
Coworker wrote:well the commented if conditional is mainly a browser hack used for IE compatibility, so that's probably not the best approach (unreliable). Changing or expanding the sig generation code is also something I'd stay away from, as you'd potentially break your site every time you went to update it.
Custom Profile Fields would be interesting, and you could probably replace the signature output code in the template with one that did what you want to do. The things you want to stay away from are making changes to distributable code, and editing database tables. Have you looked in to if there are any plugins that offer this feature?
Honor wrote:The custom profile fields is the best, in my opinion. I can create them in the ACP. They would just show up under Profile instead of Sig in the UCP. I even know how to place them in the sig area for posts.
If I do it this way, then the only two things I really need help with is this: The custom profile fields are text only. They do not operate (parse? a word I really need to look up lol) HTML or BBCodes at all, and i would need images at the very least to show (through an external uploader would make me happy, if not doable through the site itself). The other thing is making it so that the board only shows the right sig for the right forum - I would in essence have I think ten custom profile fields, one for each section of my site, and then that one sig would show in that one section only.
There are no plugins that I could find besides a guide on how to tweak the custom profile fields. I did manage to get help on making the text link friendly, but that required two fields for one link (text, then link), then the template had a moderate sized addition for just one link.
Coworker wrote:well, I don't know enough about phpBB templating anymore to give you any definitive answers. My sense is that, if it comes right down to it, you can use str_replace() function to force the text to display images, bbcode, whatever. Might get a lil complicated, but I'm sure it can be done. You can get a WYSIWYG editor with image uploading (TinyMCE is what I usually use), and there are ways to add the interface to a textbox (rather or not you break upgradability in the process is a different matter).
Once you have your method figured out, the replacing of the signature should be pretty straight forward. Just find the spot in the template where it drops, comment it out, and add a lil logic that points it to the proper custom field based on the forum your currently viewing. Maybe write a lil function that rebulds the broken HTML saved to the field, and pass everything thru it before you output.
Users browsing this forum: No registered users and 4 guests