Hi fellow devs,
Despite being pedal-to-the-metal trying to get Panels2 to RC, and from
there, ported to D6, I do occasionally find time to at least _think_
about doing other things. Like, say, documentation! Documentation is,
after all, just about the only thing that'll help clear away some of
that aura of mystery shrouding the Panels API.
So, with that in mind, I've made what I hope will be a useful first
step in that direction. I've written up some pretty thorough
documentation of the Panels 'Content Type' plugin; the documentation
includes pretty detailed discussion and samples for all twenty of the
properties available to content types in the current version of the
Panels API. That includes the handful of new ones we added in Beta4.
It's a gen-u-ine first draft, but I hope that folks might find it
useful, and maybe even comment! The entire system is doxygen-generated,
so it's got all those standard code documentation-type features you
could hope for, plus a bunch more. The main page of the API docs is at
http://doxy.samboyer.org/panels2/ , and the direct link to the content
types docs is
http://doxy.samboyer.org/panels2/panels_api_plugins_content_types.html .
Since everything's generated by doxygen from directly from the source
files in the Panels project itself, you can diff/patch and hit the queue
like you would with any other code. The doxyfile is included as well,
for those who are curious. Or at least it will be tomorrow, once I
commit it. Right now, I need sleep.
cheers,
Sam
I'm just getting used to the new (Drupal 6) menu system and there's a lot to
like about it. I can't quite figure out how to do one thing, though. Is
this possible...
Those familiar with Organic Groups know that when viewing some pages there is
a notion of a "group context". So for example if node/42 is in group 6, then
the group context is 6 when visiting ?q=node/42. Similarly, the group
context remains 6 on ?q=node/add/book/parent/42 and ?q=comment/edit/123 (if
comment 123 is on node 42).
What I'd like to do is create menu items that behave like tabs for the group.
So whenever the group context is known, the menu items would appear.
Imagine ?q=node/42 with tabs like ?q=node/42/edit, ?q=node/42/revisions, etc.
That page would also have another set of "tabs" something
like ?q=group/6/edit, ?q=group/6/tracker, etc. And those group-specific tabs
would also appear on ?q=node/add/book/parent/42 etc, whenever the group
context is known.
I hope I've explained the question reasonably well. I've read the menu docs
on drupal.org and I can't figure a way to do this. Is it possible?
Thanks, -Dave
Hi,
I'm trying to understand what is the best way to supply URL based content
through Ajax, without compromising on security and access control.
When the user clicks on the widget, an ajax URL is called upon and served by a
menu callback (e.g. http://example.com/myajax)
I'd like to also relate to the URL that the widget is displayed upon. This is
easily achieved by using a GET parameter on the ajax URL (e.g.
http://example.com/myajax?referer=user/2)
The myajax callback might call other functions in the system that use argument
checking (e.g. arg(0) == 'user' && is_numeric(arg(1) )). This is necessary if
I want to use the same functions to generate content for the non-JS version.
Therefore, I set:
<?php
$_GET['q'] = $_GET['referer'];
?>
before calling those other functions.
Assuming I don't know anything about those "other functions", this looks to me
like a security risk. Since the whole access sub-system is using 'myajax' as
the path for access checks.
Those "other functions" might assume that access checks where already ran by
Drupal subsystem, which I just bypassed.
Can you see a better way to implement this? maybe I should check
_menu_item_is_accessible(menu_set_active_item($_GET['referer']))? It seems to
work but looks a bit hackish to me...
Any help will be appreciated,
Thanks,
--
Yuval Hager
[T] +972-77-341-4155
[@] yuval(a)avramzon.net