modx creating new lexicon entry event - modx

I need to create a plugin in modx revolution. I need to set plugin event when some one will create or update a lexicon entry from modx lexicon management.I want to save created/updated lexicon entry to somewhere else. I have been searching in googles and see modx documentations. I could not find useful links. Any ideas or links will be helpful.
Thanks,
Awlad

For this you can use plugins: http://rtfm.modx.com/evolution/1.0/developers-guide/plugins and you would be wanting to look into system events: http://rtfm.modx.com/revolution/2.x/developing-in-modx/basic-development/plugins/system-events
What I would suggest is to use OnDocFormSave for your plugin, then you should be able to read lexicon data as it is has already loaded the lexicon it needs with these functions: http://rtfm.modx.com/revolution/2.x/developing-in-modx/advanced-development/internationalization
I really hope this helps, but feel free to ask again and I will try my best to help. :)

Related

How do I go about changing the contents of a page based on the URL? Express.js, Node.js

Okay. I know this question was a bit confusing, so let me decompose my question a bit further. For example, let's say I have the URL: https://example.com. I have an open GET endpoint at: https://example.com/user/* that will return a specific user's information based on what the contents of the "*" is. Lets say a specific user is at: https://example.com/user/12345. On an HTML page, I would like to put that user's profile contents and some of their hobbies. Again, this is theoretical. I have explored various solutions such as Handlebars.js which can dynamically change values based on the server request. However, this solution does not always work. Take a search engine for example at: https://mysearchengine.com/search?query=dogs. Here, we have a search query for dogs. How do I render all of the results to a HTML document without using a dynamic content module like Handlebars?
This question was particularly difficult to ask, so please do not mark this as "not enough information". I would be more than happy to clarify any questions you may have about the nature of my query. Thank you so much in advance,
Flight Dude.
Just wanted to let y'all know I found my answer: EJS. Thanks!

Extracting a url from a hotspot

I've got a collection of url hotspots in a Notes document. I'd like to extract the urls associated with the hotspots. Any hints on how to approach this?
thanks
clem
I recommend using the DXL export features and then walking the resulting XML to find the URLs. Try it, and if you have issues, come back and ask questions about the specific piece of code.

Modify Orchard Archive Filter

I am new to Orchard CMS may be this can be easily achievable I don't know how to do it exactly as i have searched a lot on Google. I have a blog where I need to display the archive in drop down Eg :
I checked the blog module and I don't know how can I filter it so that I can get this. Do I have to create a new module to achieve this or a tweak in the Blog module will work. I Read the sky-walker tutorial to understand how to create a module but i don't know how to achieve this.
You need to override the Parts.Blogs.BlogArchives.cshtml, very easy. That is what Orchard is all about. you can read more about it in the documentation.
Check this Accessing Shapes , for starters.

Modx - Extend site_content - Add new table

Currently, we're running revolution 2.2. On site_content, we have some tags that are ran for crawling twitter. I want to start tracking the number of results for each tag as results come in, to determine which tags don't return that many results, etc.
So I was thinking that I should create a new table (twitter_data), and have a foreign key that will link it to the search tag ID, which is stored in site_content.
What is the best path to accomplish this? Should I create my table then run the reverse schema tool, outlined here?
http://rtfm.modx.com/display/revolution20/Reverse+Engineer+xPDO+Classes+from+Existing+Database+Table#ReverseEngineerxPDOClassesfromExistingDatabaseTable-CreatingaMySQLtable
I also found this, but not sure if this is what I should be looking into:
http://rtfm.modx.com/display/revolution20/Using+Custom+Database+Tables+in+your+3rd+Party+Components
Probably not - if you can avoid modifying the core modx schema do so. an external table may be your best option, but requires a fair bit of work.
though if you can explain wht you mean by 'tags' a little better [html tags? snippets? content tags? not sure what you mean] there may be other options. for example. one of our clients wanted to count page hits [and didn't want to use google to do it] so all we did was to create a template variable bound to each page they wanted to count and then updated that appropriate variable by writing plugin to fire on the onpageload or onpagerender event. [I don't ermember exactly which or what it was called]
Basically, you may be able to do this by writng a plugin rather than trying to extend anything or add snippets/chunks.

How to insert a widget inside forum inself in vbulletin?

You know, the publishing suite offers other content than forum. for example blogs and also some custom content
i know how to add articles/widgets to the page itself, but how do i add such a thing into a forum secion?
for example, on the left column i would have forums and on the right column i would have some news reader widget
could someone help?
Maybe it is enough for you to enable the "forum sidebar" in the admincp.
admincp->Settings->Options->Forum Sidebar and Block Options->Enable Forum Sidebar=YES.
Now you can add custom blocks with HTML and PHP.
For vBulletin 3.x, the solution is to edit the appropriate templates (FORUMDISPLAY, SHOWTHREAD, etc). I can't be much more specific than that, I'm afraid, since the exact details will vary depending on what kind of modifications you've already made to your templates and the exact details of the widgets you wish to insert.

Resources