I am new to DRUPAL switching from codeigniter. I have a project on drupal you can check the link here http://idcr.cprindia.org/database. Someone please suggess me how can make search + show output with maps on the given link (with proper ajax).
how to do this integration. I have an html which is using bootstrap. (i think that will create problem to existing website).
Good morning,
As far as I know, displaying a Google Chart is quite easy. You just have to add some Javascript code.
I suggest writing your own module. In this module I would create a block. First of all, you need to perform the database queries needed to gather the info you want to display. Second, you should use drupal_add_js() to invoke a function stored in a different JS file. You need to pass the chart info in the settings array.
Hope it helps.
Related
I am creating a Wordpress plugin for the admin area. It needs to set options and write to a file and database based on the options that are saved.
I have tried creating a "Create File" button which sends POST data back to itself. I now need to create a file and add a column to the database based on a hidden boolean filed.
I'm struggling because I can't do what I want because the form needs to have a different action. Any advice on how to so this?
What a different action? Without any code examples that show what you're doing and what exactly is not working, we only can imagine and give you general info. In Wordpress, you don't have to care about naked url options cause the core will do this for you. Its enough to register the required hooks, read the passed data here and do what is required with them. Simple storing settings wouldn't require to extend the database scheme, since Wordpress already have a table for this. You could use the Wordpress functions here.
See the article of the Wordpress developers page: https://codex.wordpress.org/Creating_Options_Pages
Using the hooks, its no big deal to create a file too. Simple write your PHP code after saving the settings in the database. How you concretely do this depends on the requirements: Is the data passed as form field? Is it fetched from an external source (like api)? Depending on the requirements this should be done with relatively less work using a search engine, cause enough sample codes exists for those scenarios.
I'm building a webapp which main purpose is displaying widgets on a display. These widgets have an variable size, so not every widget is even high or wide (But they are using standards like for example a grid system). Now I'm looking for the best way to save which widgets are used, and where they are placed. For example by using something like Gridstack the user can drag and place the widgets in an admin panel, but how should I save this? And how can I recall this and put in a empty Bootstrap page for example. Working with the Bootstrap Grid system would be great aswell.
I did some research on Google and here but didn't find any plugins or ways to do this.
I'm using 'Gridster' at the moment which this Gridstack is built off of/inspired by, so it probably won't be able to save for you.
You'll need to do that, either by sending it back via AJAX or storing in local storage. As it looks similar, you should be able to find a 'serialization' function which should wrap it up ready for you to send to your PHP via AJAX.
You may need to scan through the widgets and wrap them up in your own JSON string, such as the row/column/sizex/sizey which is all the grid system really needs to "add" a widget when its first loaded up, so as long as you can feed that back in you should be good to go.
I am developing a Content Manager System using PHP and wonder if there is a css generator i can use as a plugin. The generated code is stored in MySQL database.
I have looked at many of these here, but i cant seem to see any i can provide to my users as a plugin.
I want one that creates layouts and can change background. If i cant get one, then how do i create one.
i hope you cant get any plugin for that, since the page you are designing must be known to you [positioning, font size, etc]
First, Create a complete site with some css which hold layout, like a1.css
then , you can do the same with same attributes with a2.css, a3.css...etc.. [this may be terrible]
or
you can change dynamically by Jquery to generate dynamically , like
.css( "padding-left", "+=15" )
or use different frameworks and make it accessible, LINK
hope it gives you an idea!
For people interested in doing web apps for Google TV, especially those with video content, the easiest way is use Google TV Templates: https://developers.google.com/tv/web/docs/gtv-templates.
The original Google TV Templates were developed with video source files hard coded in Javascript file. A number of people have asked about how to implement a backend with PHP and MySQL and store video sources there so that they can be dynamically loaded from frontend within the Templates. The following article was written to address this question.
https://developers.google.com/tv/web/docs/ajax_gtv_templates_tutorial
The tutorial walks you through how to set up a database in MySQL (i.e. schema, sample data), PHP code to serve data, and modified Javascript to do AJAX loading.
Currently to add video source data into the database, one can use straight SQL but it may be more desirable to build a PHP admin front end.
A bug was recently reported by Maurizio on Google TV Developers +page: https://plus.google.com/117492290125593364976/posts:
"Hi, i downloaded the html5 template mysql version. it is working fine but if i add more than one category , the last one added is repeted. Do u have any idea of how i can fix this problem? many thanks."
I'll follow up with a fix.
A fix to this bug is available and a new download is at: http://gtv-resources.googlecode.com/files/gtv_template2_ajax_php_mysql.tgz
The actual fix is in this php file:
http://code.google.com/p/gtv-resources/source/browse/trunk/gtv_template2_ajax_php_mysql/videosources.php
If there is interest, please ask a question and I'll write up an admin page as well.
i am stuck here please any one suggest me how to do this. i want like this http://www.finchatton.co.uk/. in this URL at top of the menu there is a link "COMPLETED DEVELOPMENTS". please click once. in this page click on one of the area in map. now we will get hot spots in map. so i have to create that spots dynamically.
anybody give an idea.
thanks.
That is done in Flash, it has nothing to do with PHP. PHP could probably be used to parse some data that Flash uses later...
EDIT: If you want the same functionality...
I suggest using Google maps API http://code.google.com/intl/lv/apis/maps/index.html
Just store the interest points in database with coords, then just fetch and display them on the google map.