Reviewed & tested by the community
Project:
Node Option Premium
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 May 2011 at 15:54 UTC
Updated:
6 Jun 2014 at 16:51 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
anrikun commentedIt is allowed but filtered using the default filter.
On 7.x, "plain text" is by default the default filter.
2 solutions:
- define a custom default filter.
- or override nopremium theme functions in your theme
Comment #2
axel pressbutton commentedHi anrikun,
I'm trying to achieve the same here but my custom default filter is being ignored. It should at least be letting me add the following without spitting it out as text (see attached example);
<a href="/blah">text</a>Plain text is 4th in my list of input formats. Have also tried this with Full HTML at the top of the list.
...any advice would be greatly appreciated. Thanks.
Comment #3
anrikun commentedI'll have a look at this once I get back from holidays :-)
Comment #4
megachrizI have created a patch that adds support for text formats for the messages, so you are able to use any filter.
The patch makes the following changes to the module:
- nopremium_settings_form() no longer calls system_settings_form(). Instead a submit handler is added to save the settings. I changed it this way because for the default message and for each node type two settings now must be saved: the message and the text format.
- A function nopremium_get_text_format() is added to get the text format for the given node type. Just as nopremium_get_message() it checks if the message is not empty. If the message is empty the text format used for the default message is returned.
- The function theme_nopremium_message() is altered to use the appropiate text format.
Comment #5
megachrizSmall change in comparison with the patch above:
- Adds message that the settings have been saved when the settings form is submitted.
Comment #6
seanbfuller commentedAdded #5 and it is working great. A must have since most admins will probably want to include a call-to-action link to get users to a page where they can join to access the premium content.
Comment #7
liliplanet commentedplease ignore the zip, don't know how to delete the attachment
Comment #8
deadbox commentedPlease can somebody explain to a newbie how to apply the patch?Never mind I figured it out, all done :DI'm finding it doesn't accept full html though. Although the full html option is there and my ckeditor shows the full set of buttons, I can't colour the font, change its size or add a border. It does allow me to make the type strong and include live links which is fantastic, but I was wondering if there's any reason why I can't customise it fully?
Comment #9
theSEOeffect commentedI am having this same issue and have never applied a patch before. Do I just navigate to the module and paste the patch somewhere? I am using the most recent version of the module and it would be awesome if you could give me a little guidance on how to implement this patch.
Thank you so much!
Comment #10
theSEOeffect commentedIf I just uninstall the current version and install the #7 zip file listed here, does that include this patch? It seems like it would be so awesome just to say replace "this file" with "new file". Is that possible :)
Sorry for being such a noob...
Comment #11
megachriz@theSEOeffect
https://drupal.org/patch/apply
The patch should be applied relative to the module folder. So, if using the command line, you would first need to go the module folder like this:
cd sites/all/modules/contrib/nopremiumThere is no need to uninstall the module.
Comment #12
bjlewis2 commentedPatch in #5 works perfect against latest git clone of 1.x. Exactly what I was looking for!
Comment #13
devkinetic commentedD6 port of #5 here #2207087: Allow HTML markup in message
Comment #14
kenorb commentedTested the patch at #5 and it works fine, thanks.