I want to create modules for my content types. Looking over the drupal field api as well as some examples of creating content types programmatically, i have a basic module. But theres a few things I can't seem to get working.
On text_with_summary, I have no idea how to set the number of rows, and how to set it so it actually has the summary. I've tried numerous settings in my code, and my field still has 20 rows, and the summary is unchecked. Be happy if anyone can even point me toward some good examples.
I tend to look at the examples modules when trying to learn.
http://drupal.org/project/examples
Related
I posted a question on the Drupal forum about whether I should build my database in Drupal using content-types or the database abstraction layer and schema module: [here][1]
Any advice would be greatly appreciated.
[1]: https://drupal.stackexchange.com/questions/98020/should-i-use-content-types-or-database-abstraction-layer
I'd recommend using content types.
For a PHP coder, sometimes using the Drupal User Interface to build things feels non-intuitive, but in the long run you're going to benefit a lot from doing things "the drupal way.
Once you reverse engineer your need into a content type and all it's associated fields, install the modules that provide those field types and set things up, you'll start to see the benefits.
Validation on all the data-entry froms will already be done for you.
Multiple display modes are available for your data (email addresses can be shown with or without mailto: links, images can be shown using any of Drupal's image styles)
Integration with other Drupal modules already exists, and will be supported (almost anything built with fields is available to views)
By writing your own schema you'll need to handle all these things yourself (and more), and not just once, but you'll need to maintain all that custom code over time.
Learn to leverage the community and all the great work that's been done already, you'll save yourself time in the long run :)
What i see you are going to have shop site.
You may tray this:
https://drupal.org/project/commerce_kickstart
, i've found it usefull once. It's drupal distribution with nice themed shop rady to use straight forward.
And of course do it with content type + views + entity reference modules.
Here is a link to a comment that answers the question I asked. It backs up what arpitr outlined in their answer on the orignal post on the drupal forum, whose answer is also in agreement with jenlampton's suggestion above.
https://drupal.org/comment/7848011#comment-7848011
I will implement my system using node entities until the need arises to build a custom entity (if it ever does).
The top answer in this forum give a good way to evaluate whether to use nodes or custom build an entity:
https://drupal.stackexchange.com/questions/22586/when-is-it-appropriate-to-create-an-entity-versus-just-adding-a-new-content-type
I'm attempting to learn a bit more about out how grid filtering works in Extjs.
I'm using the example that comes with the JS 4 download, i.e.
http://docs.sencha.com/ext-js/4-0/#!/example/grid-filtering/grid-filter-local.html
I can run it on my local server such that it displays the grid outline (with filter options in the column headers), but no data gets loaded at all. I was hoping that I could just use the local flag with the accompanying JSON file without the need to get involved with the SQLlite aspects, for a start.
I can't figure out why the JSON data isn't loading though. Any help, hints or tips would be much appreciated. I've spent ages on this, looking at other examples, both via here, Google and the Sencha website.
Mark as complete (see above) though I don't know detail on why it's started working.
i am new to drupal and it is irritating me. i have mastered wordpress and SMF forum software to a near expert level. but drupal as well as joomla have made the admin interfaces so totally confusing i wish there was an answer available for me to use and drop them altogether.
i cant get the slide show to show up on the front page or any other page. i cant find in there a sufficient means of manipulating the content blocks and logging and nav blocks. i am not new to computers and programming, and if this was a programming problem, i probably would have fixed it by now, but the interface is so confusing i cant get the site to do anything im wanting it to do.
i have looked at several tutorials that dont help at all. i found out about a part time job my company is offering and i know for fact i can do it if i can get past the fact that the admin interface is a maze of confusion.
theme demo - http://adaptivethemes.com/demos/atcommerce/
my test - http://tse.myfewclicks.com/drupal/
i beg anyone willing to help. i need to have something presentable, at least a good taste by monday. i could have already been done with it with SMF or wordpress, but they are the wrong type of software for the job.
please help someone.
It would appear that you may have solved your problem. I followed your link and the image rotator was working.
About the only difference was that on the AT demo site I was able to click the dots at the lower right hand corner to select the image I wanted whereas on your test site I was unable to do so.
first of all, please excuse my ignorance, this is an exploratory question, rather than a specific programming program that needs solving.
I have a number of clients that have unique websites, none of which I was involved in developing. I would like them to be able to display a calendar of common events, but which would also contain events unique to them.
Is it possible using something like Server Side Includes to be able to give them a few lines of code which they could insert into their website (on any particular page) which might display a calendar type display, which their users can then interact with?
I guess I am looking for something similar to a Google calendar but I do not want to use a Google calendar. The key thing would be that they would only need to insert the few lines of code on one of their webpages; they wouldn't have to install any software on their servers.
Any suggestions?
Thanks
Damien
There are are all sorts of web calendars that will allow you to include them on a web page (typically using javascript, not SSI). Some are targeted at specific platforms (ie, Wordpress) and some are more generic.
Try searching "web calendar widget" for examples.
You'd have to put some amount of content on their site. If you can do that, you can include some javascript that will load more javascript from the server side that can do the bulk of the calendaring work for you.
You wouldn't be able to just drop a few files on the server and have them work, you'd need some way to link to them by changing the existing content on at least one of the pages.
I may be misunderstanding your question though.
If you are looking for specific recommendations on web calendar widgets, Arshaw's fullcalendar is my favorite to date.
It displays a great calendar that can be easily styled with css or jquery ui themeroller and is very programmable. The website has great documentation and examples as well.
Per using it on different sites, it supports that easily.
Note, I'm not affiliated with that calendar at all, just a satisfied customer.
I know that it's possible to add a filter row UNDER the column title because I've seen it done with Coolite. But since I'm a total newbie with Sencha (ExtJS), I have trouble finding how to do it with the ExtJS.grid.GridPanel directly in the script. Would you point me in the right direction with some samples please ?
If possible, I would like to do so without plugins, but if there's one out there doing great and easy to use, I could change my mind.
Thanks !
Here you have a link to the GridHeaderFilters Plugin. There you have an easy example of how to use it.
And regarding your comment about trying to do this without a plugin I recommend you not to do it. Because this might seem like a easy code to write but I believe it is not. And that is why this plugin has hundreds of lines. I think this is not a plugin full of features that you won't use, this plugin just does the filtering the way you need it.
And as a final note, if you are expecting the exact same behavior as in this coolite example I think you are out of luck. Because if you get the javascript source code of that example and run it through jsbeautifier you will see that this example is not using any ExtJS plugin and is not a easy code as is using a really complex template for the headers.