Sunday, February 8, 2009

SwfObject related links and digest

//===
SWFObject javascript library, http://code.google.com/p/swfobject/
SWFObjectAPI module, http://drupal.org/project/swfobject_api

To add flash blocks, still need swfobject module
http://drupal.org/project/swfobject [no release for drupal 6 yet?]


Step by step guide to use swfobject.js with cck
http://openconcept.ca/blog/varun/creating_a_flash_cck_content_type_with_swfobjectjs


//===
http://code.google.com/p/swfobject/wiki/documentation

http://www.alistapart.com/articles/flashembedcagematch/
[February 06, 2007]




"...
look into the complexities and subtleties of embedding Flash content and
examine the most popular embedding methods to see how good they really are.
...
Opera also introduced a similar click-to-activate mechanism. These mechanisms work like speed bumps in the road: you have to break, slowly drive over it, and push the gas pedal again.
...

'object' method is not browser-specific and is therefore the preferred implementation.
...

'embed' simply has never been a W3C recommendation and it never will be, because of patent issues. However in reality it does have better cross-browser support than each single implementation of the object element alone

...
Flash Satay

Another option is the Flash Satay method, which ... includes an additional movie parameter to avoid the bug that causes Flash content not to display in Internet Explorer. ...

It also includes a container Flash movie to fix the Internet Explorer streaming bug

<object type="application/x-shockwave-flash" »
data="c.swf? path=myContent.swf" width="300" height="120">
<param name="movie" value="c.swf?path="myContent.swf" />
<p>Alternative content</p>
</object>


...

DOM scripting

..."

DOM scripting: UFO, SWFObject, ObjectSwap --> SWFObject2.0

Tuesday, January 13, 2009

node_revisions concept digest

"...
Can I assume that the node_revisions record with the latest timestamp is the most current?

No. Drupal core does this and it can cause problems: http://drupal.org/node/300714

Or should I assume that the node_revisions record with the largest vid is the most current?
No.

If neither of the prior two how can I tell which node_revisions record is the most current for a node?
By the value of vid in the node table.

What is the node_revisions.log field used for? Mine are always blank?
This is the value of the log field on the node edit form.

Where do I set revision tracking in the UI? Do I do it on a per content-type basis? Globally? Other?
It is configured on the content-type settings page.

And finally, is there anything else I should know about working with the node_revisions using raw SQL?
Probably. You should have a good understanding of the hook_nodeapi function if you are planning on modifying nodes and directly manipulating the node_revisions table.
..."

Q from MikeSchinkel - December 24, 2007 - 21:48
A by imrook - September 7, 2008 - 18:27
[ref] http://drupal.org/node/203697

tables: node, node_revisions

node:
+-----------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+------------------+------+-----+---------+----------------+
| nid | int(10) unsigned | NO | PRI | NULL | auto_increment |
| vid | int(10) unsigned | NO | UNI | 0 | |
| type | varchar(32) | NO | MUL | | |
| language | varchar(12) | NO | | | |
| title | varchar(255) | NO | MUL | | |
| uid | int(11) | NO | MUL | 0 | |
| status | int(11) | NO | MUL | 1 | |
| created | int(11) | NO | MUL | 0 | |
| changed | int(11) | NO | MUL | 0 | |
| comment | int(11) | NO | | 0 | |
| promote | int(11) | NO | MUL | 0 | |
| moderate | int(11) | NO | MUL | 0 | |
| sticky | int(11) | NO | | 0 | |
| tnid | int(10) unsigned | NO | MUL | 0 | |
| translate | int(11) | NO | MUL | 0 | |
+-----------+------------------+------+-----+---------+----------------+
15 rows in set (0.00 sec)



node_revisions:
+-----------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+------------------+------+-----+---------+----------------+
| nid | int(10) unsigned | NO | MUL | 0 | |
| vid | int(10) unsigned | NO | PRI | NULL | auto_increment |
| uid | int(11) | NO | MUL | 0 | |
| title | varchar(255) | NO | | | |
| body | longtext | NO | | NULL | |
| teaser | longtext | NO | | NULL | |
| log | longtext | NO | | NULL | |
| timestamp | int(11) | NO | | 0 | |
| format | int(11) | NO | | 0 | |
+-----------+------------------+------+-----+---------+----------------+
9 rows in set (0.00 sec)