I have a cloud search domain which is integrated and working well to generate fields.
I have three facets which are
Class
Title
Content
all the above are text fields
Now i have a need to add suggestions and get search term suggestions on the site. for this i've got two requirements
To give suggestions from the Title as the source
To provide suggestions from the Title but also only with the entries which has Class as Event
I am can easily do the first one,
how do i do the second ?
any help is highly appreciated
There was no solution for this one,
what i did was to have two indexes, and get the suggestions from one. the indexes were
Class
Title
EventTitle
Content
and for one fields i got the suggesters by Title and for the other one got them from EventTitle.
Related
I have posts with documents as attachment which we saved it as post meta.
Whenever user search with any keyword on site it should look into the document as well for that keyword. If keyword found then we will show the post in search results.
The SearchWP indexing the document but content Field on edit screen is empty.
Please let me know if anyone knows it.
Thanks in advance
The easiest way to do this is to try using the Elasticpress plugin.
From the homepage:
Documents: Indexes text inside of popular file types, and adds those files types to search results.
I have to add the custom Post id for the custom post type. can anyone help me?
Check screen short for more details. http://prntscr.com/mo3eyu
This is a work around that works.
Background info:
We maintain a few almost identical web pages with different branding. The code repo is shared across these. The developers hard coded page IDs into the PHP in the past. I was asked to add new pages. After adding new pages on each website, I noticed the IDs were all randomly generated. This was breaking PHP code's logic. So, I needed to edit these IDs just like OP.
The work around:
In WP web admin page, there's an export / import functionality under tools menu. The new pages should be created in one site, then exported / imported onto other websites. This way, page IDs don't get created randomly. It copies the IDs from the exported page. So you can have same IDs on all pages.
PS:
Not sure why the past developers decided to hard-code page IDs in the code. This shouldn't have been the case to start with. When you don't have much time to refactor everything, stack overflow always comes to help.
IDs determine post record storage in database, changing them directly would be highly prone to breaking things. For example extensions often store IDs as a way to refer to specific post and do something with it.
The simple way to change to some ID would be to just create a new post and copy data over (through admin or with code either).
Post ID of a post also reflect in tables other than Post table, like post comments table. Changing post ID will disturb the relationship of post table with other tables, so it is not advisable.
I am new to Joomla, I am currently trying to set up a information portal for a university which will have information regarding all the faculty members. The information to be displayed would have information like Subjects they teach, total experience, phone number, email id, address, etc etc.
Normal way to deal with this to write a new article about each faculty member.
But I want this to be more dynamic. I dont like the idea to create a new article for each faculty. I am looking for a way that all the information(subjects, email, phone, etc) should be stored in database and while displaying all information should be fetched from the database itself and should be displayed in a preformated way.
Please let me know if anyone is having any idea regarding this..Many Thanks in advance
I'd use a CCK plugin like K2 and add and Extra Field Group, like this ... that way it could be added in the admin. Done what you're doing with many types of content this way.
UPDATE: Just remembered this great little component called joodatabase
You can create a module, or use one from the Joomla extension directory (You're looking for a directory module). A module in Joomla will allow you to access the data stored in the database.
http://extensions.joomla.org/search?q=directory
You can include an external PHP Script in your article and let the php script handle the data based on the query string paramerter(may be like faculty id or something). In order to do that you will need to install a module. http://extensions.joomla.org/extensions/edition/custom-code-in-content/60. Using this module you should be able to include a php script within the article.
Old thread but still a hot topic
I think Dynamic Articles with TinyButStrong would solve this problem
https://www.tinybutstrong.com/plugins/joomla/tinybutstrong_help.html
For example adding Tag or Search Parameter into content if no article exist.
Place for much more phantasy
DISQUS commenting system is nice. API is confusing me a bit, so if anyone can please guide me to the right directions.
What I want to do is to get the total number of comments from dynamic pages/posts and insert that number to a MySQL table so I can filter the posts of those pages according to the total comments number and display each post's comment number in the forontapage, sidebars etc. Of course, I would like to update those rows later with a function I'll create when new comments pop up. But what I am asking is just the way I can get them.
Below my disqus_indentifier:
var disqus_identifier = <?php echo $post_id ?>;
Thanks!
As you discovered, the Disqus comment count script is definitely the best solution for what you're trying to do. It doesn't require any API integration or database work. Simply paste the code on your site and it will automatically find the counts for all comment count links on the page and show the relevant Disqus comment count for each.
For anyone looking to do more granular work along these lines via our API, the best endpoint would probably be threads/details which returns the details for a thread (including the number of comments). As far as inserting that information into your database I'd recommend looking over basic SQL INSERT documentation.
We've also put together some sample API recipes which can help you jumpstart your API integration, including a threads/details PHP script.
I hacked ignite component to tag people to an image and send email to them, in the email body I need to insert a link to point to the article that contain this image.
I inserted the image in the article using ignite plugin.
how can I get the article link that contain ignite gallery plugin with categoryid = x
is it possible to get it ?
thanks alot
If you're using Joomla 1.5:
I'm not positive how this Ignite package works, but from looking at their website it seems that they're pushing galleries into articles on render? So from that I deduced, they're probably using something like onPrepareContent in their plugin which takes &$article by reference (so it can be modified). If you were looking to access the article ID in the plugin all you would have to do is use $article->id.
However, if you're looking to access the article ID in the component I would think you would just need to know the table that Ignite is storing the information in where it contains the article ID and the category ID. Then when you know the table you should just be able to query it and return article id where categoryid=x. If you haven't written a query before in Joomla this should help: How to use the database classes in your script.
If you have any more specific information please tell because it may help someone else who has used Ignite give you a better answer.