首页 \ 问答 \ Joomla自定义模块中的javascript(javascript in Joomla custom module)

Joomla自定义模块中的javascript(javascript in Joomla custom module)

我有一个由“highslide”软件生成的代码,它的作用是创建一个图库。

此代码由.css html和javascript组成。

如果我将htmal代码放在Joomla的“index.php”文件中,然后将文件的其余部分放在根目录中,那么图库就会正常工作并放在Joomla的每个页面中。

我不想要这个。 有没有办法将图像库分配给我选择的页面? 或者有没有办法找出该特定页面的index.php主文件我需要有库和粘贴代码?

我试图通过Joomla的编辑器在自定义模块中插入代码,但是当我单击“保存”时,它会编译代码并删除它的某些部分而无法工作。 它删除了javascript和css文件的链接。

是否有一种方法没有任何其他第三方扩展将该代码放入自定义模块,而没有Joomla消除了一半的代码?

谢谢,

最好的祝福,

Andreas Achilleos


I have a code generated by "highslide" software and what it does is to create an image gallery.

This code consists of .css html and javascript.

If I place the htmal code in the Joomla's "index.php" file and then the rest of the file in the root directory then the image gallery is working and is placed in every page in Joomla.

I do not want this. Is there a way of assigning that image gallery to only pages I choose? Or is there a way to find out what is the index.php main file for that specific page I need to have the gallery and paste the code in there?

I have tried to insert the code in a custom module via the Joomla's editor but when I click on save then it compiles the code and remove certain parts of it and cannot work. It removes the link to javascript and to css file.

Is there a way without any other third party extension to have that code into the custom module without then Joomla eliminate the half of the code?

Thank you,

Best Regards,

Andreas Achilleos


原文:https://stackoverflow.com/questions/21386111
更新时间:2024-02-13 16:02

最满意答案

JSFiddle的方法在为修改版本分配新GUID并仅记录与数据库中原始条目的关系方面有什么好处?

我想象没有,两者都需要相同的复制操作和相同的双查询(在MongoDB中)来获取父。

唯一的区别是你走过的领域。

我错过了什么吗?

不是我能看到的。

有没有正确和错误的方法吗?

好像你坦率地说这个很好。

MVCC确实在某些方面似乎是正确的做法,但是你不必全力以赴。 如果你在那里可能有原因让你改变一个像CouchDB那样内置它的数据库,或者因为MongoDBs实现将在其当前现有的锁机制之上,就像在锁上添加锁一样。


What is the benefit to JSFiddle's method over assigning a new GUID to the modified version and just recording a relationship to the original entry in the database?

I would imagine none, both would require the same copy operation and the same double query (in MongoDB) to get the parent.

The only difference is what field you go by.

Am I missing something?

Not that I can see.

Is there a right and wrong way to do this?

It seems as though you have this pretty well covered frankly.

MVCC does seem the right way to do this in some respects, however you don't have to go the full hog. If you were there might be cause for you to change to a database that has it built in like CouchDB or something because MongoDBs implementation would be on top of its current existing lock mechanisms, its like adding a lock on a lock.

相关问答

更多

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)