Affichage des articles dont le libellé est Re: Help needed on re-coding a mod. Afficher tous les articles
Affichage des articles dont le libellé est Re: Help needed on re-coding a mod. Afficher tous les articles

Re: Help needed on re-coding a mod

jeudi 4 septembre 2014

A really useful tip. A new knowledge for me today. ;)



Just a little add up that I learn from other mods, BurkeKnight, you can also give description to your mod using the following code:

[code]

// Mod authors, feel free to modify this alternative menu b...



Re: Help needed on re-coding a mod

Re: Help needed on re-coding a mod

:)



Re: Help needed on re-coding a mod

Re: Help needed on re-coding a mod

So now, this mod should be 100% approval ready. :)



Thank you my friend...

Sorry if did not understand you, but this is all new parts for me to coding.

Maybe, it'll help me make some more mods, too. :)



Re: Help needed on re-coding a mod

Re: Help needed on re-coding a mod

Yup, to run the stripping of non-valid tags before it gets saved to the database.



Re: Help needed on re-coding a mod

Re: Help needed on re-coding a mod

No, that's not what I said at all. Nor is it a trick question.



You have the normal $config_vars definitions, which you had just fine.



Now, what I was telling you to do was put in $_POST['gkstyle_start'] = strip_tags($_POST['gkstyle_start'], '<span><str...



Re: Help needed on re-coding a mod

Re: Help needed on re-coding a mod

ManageSettings.php



Wait, this is a bit of a trick question issue, isn't it?

I'd place it with the code I already have, since that is right above a save call anyway, right?



So would be:



[code] $_POST['gkstyle_start'] = array('text', 'gkstyle_start', '30...



Re: Help needed on re-coding a mod

Re: Help needed on re-coding a mod

And I thought I'd told you already :P



The problem is, if I tell you how to do all of it, it's not really a learning experience for you, is it?



Re: Help needed on re-coding a mod

Re: Help needed on re-coding a mod


You can't use <style> in line in a page. Not allowed.



As for where you would use it, you would use it during the save routine. $string is more a placeholder for descriptive ...








Re: Help needed on re-coding a mod

Re: Help needed on re-coding a mod

If you're using the strip-tags code, that's all they're able to use anyway ;D



Re: Help needed on re-coding a mod

Re: Help needed on re-coding a mod

Okay, mod updated on mod site.

Like stated in PM to Cust team, if people use tags that are not listed, then, basically, that is on them, as I have it clearly stated on mod settings page which tags can be used.



Allowed HTML Tags: <strong></strong> <em><...



Re: Help needed on re-coding a mod

Re: Help needed on re-coding a mod

What you're describing is not option 2, though it would work just fine if you replace the relevant < and > with &lt; and &gt;



By putting that as the main text item attached to the relevant option it should just work even if it will be ugly as sin in th...



Re: Help needed on re-coding a mod

Re: Help needed on re-coding a mod

check the example i gave, it has the tags in it using html entities



Re: Help needed on re-coding a mod

Re: Help needed on re-coding a mod

#2 should do it.



Line would be:



Code: [Select]

$txt['gkstyle_start'] = 'Opening HTML code to be used before group name:<br />Allowed HTML Tags: <strong><em><span>';

I think those would be the only tags really needed for this, as can't use <u></u> as it u...



Re: Help needed on re-coding a mod

Re: Help needed on re-coding a mod

You can't use <style> in line in a page. Not allowed.



As for where you would use it, you would use it during the save routine. $string is more a placeholder for descriptive purposes. In your case, I'd assume use of $_POST['gkstyle_start'] and $_POST['g...



Re: Help needed on re-coding a mod

Re: Help needed on re-coding a mod

Okay, where exactly would I place this?



strip_tags($string, '<style><span><strong><em>');



<div> tags make unexpected extra line break after, so that would be one I'd want not to be allowed, but style, span, strong, and em should all be okay.



EDIT:



Also...



Re: Help needed on re-coding a mod

Re: Help needed on re-coding a mod

OK, so ultimately this is about ensuring what tags are used by the people who use that, and ensuring what tags they are allowed to use. Using </html> or similar in those boxes would be bad.



The only problem with that is that it's an extremely difficult...



Re: Help needed on re-coding a mod
 

Lorem

Ipsum

Dolor