Please forgive me if I'm asking this in the wrong place/forum etc. I have just installed the latest (dev?) snapshot of the asset module, and I am also using tinyMCE. I am a drupal first-timer, and only have limited php coding experience.

I have downloaded and installed the asset module.

I can get to the "insert assets" wizard, and it allows me to upload files etc (I am only working with pdfs at this stage), however I cannot seem to be able to insert links to these files within a drupal post. At best, I get nothing at all, at worst I am getting an error like [asset|aid=3|format=link|formatter=asset|title=testfile pdf] when I try and setup the link in my post.

Is there a plugin available yet for tinyMCE which allows me to insert links to uploaded files from within the editor? I went to the the tinyMCE plugin list but can't see anything applicable yet. Perhaps I am too soon since you only just checked in the new versions?

Comments

wmostrey’s picture

Assigned: Unassigned » wmostrey

You probably need to enable your input format to parse asset links: go to admin/settings/filters/1 (for the Filtered HTML input format) and check the "Inline file assets".

The asset module comes with a TinyMCE plugin. You can find it in tinymce/drupalasset in the asset module folder. If you have installed TinyMCE correctly, you can copy that directory (or make a link if you're using linux) to tinymce/tinymce/jscripts/tiny_mce/plugins so you have a directory tinymce/tinymce/jscripts/tiny_mce/plugins/drupalasset.

Can you confirm this solves both of your problems?

petey318’s picture

Hi, and thanks for the quick reply! You are 100% correct on the asset links - I have now enabled the "inline file assets" and drupal now recognizes the assets.

No joy unfortunately with the second suggestion. I copied the drupalasset directory over, as you suggested, however tinyMCE doesn't seem to be "seeing" this plugin. NB in the tinymce directory of your asset module, there were two files sitting there in addition to the drupalasset directory.

These are asset_tinymce.js and asset_tinymce_helper.js

Currently these are still sitting in the asset/tinymce directory. Do these stay where they are, or should I have moved these somewhere?

sdecabooter’s picture

petey318: see http://drupal.org/node/149582 for TinyMCE integration.

wmostrey’s picture

petey318, can you confirm this fixes your issue? If so, feel free to mark this issue as "fixed".

petey318’s picture

Status: Active » Fixed

I made the manual adds to tinymce/plugin_reg.php as suggested, and it all works fine.
Thank you very much.
Cheers
Pete

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

atomspork’s picture

Title: tinyMCE plugin for asset module » asset bonus working only for ADMIN user...
Status: Closed (fixed) » Active

I have gotten the Asset Bonus module working for my admin account, but the inline players are not being interpreted (not appearing) correctly for any other user. It DOES work when pasting in code choosing the "link" option, which just gives a link, however.

(NOTE: I HAVE tried duplicating the drupalasset folder as described above...)

in other words, if i paste in this:

[asset|aid=11|format=swfobject|formatter=asset_bonus|title=flotel1.swf|width=775|height=800|align=none|version=6|bgcolor=#FFFFFF]

and ends up interpreting (and showing) this text in the blog:

Replacement Text var oSwf = new SWFObject("http://skuldt.com/funland/files/sounduser/flotel1.swf","swfobject-object-11","775","800","6","#FFFFFF"); oSwf.write("swfobject-11"); oSwf = null;

I wonder if this is perhaps:
1. a permisssions thing
2. a problem with the directories in which the players/modules are installed?
3. a scope problem with folders where files are being uploaded to...

Thanks--!

wmostrey’s picture

Atomspork, I think you're confusing a couple of things. This (closed) issue is about TinyMCE integration while you are talking about Asset Bonus and your actual issue is really about filters. Did you read the installation documentation? The second step is to enable the "Inline file assets" option for an input filter. I believe you missed this step. Since admin has access to all filters, this will work for him. So read through the documentation, update the filter (clear the cache_filter table if needed) and check if things work as expected then.

atomspork’s picture

First of all, pardon me for posting in a (closed) issue. It seemed like a relevant (though closed) thread as the asset integration with TinyMCE does not seem to work... So not too sure about the protocol on closed issues.

But, yes, I did in fact read the documentation, and yes, inline file assets are enabled. Cleared caches, etc. I'm not so sure whether I am confusing these things or whether a couple of things here are confused... The fact is, most all roles (except admin) are unable to correctly get the inline players to appear. I am not so sure this is about filters.

Any other thoughts?

I've had myself and a quite experienced drupal user poking around here. Not too evident.

wmostrey’s picture

Status: Active » Postponed (maintainer needs more info)

Atomspork, did you have more luck on this already? It really seems to me you have some malconfiguration: a role not having access to the chosen input format, cache_filter not cleared...

wmostrey’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)