Drupal ThemesUser login |
Drupal Module DevelopmentjQuery versioningIs it possible, within a javascript file, to do an if based on the current jquery version? like: if ($.version == '1.2.3') { Thanks! Categories: Drupal
Organic Group PanelAfter having configration, og panel will work same like the panel pages. but how mini panels can be created in this way. and how we can show context between different pane in og panels. Categories: Drupal
Fields in views organized in 3 collums - fieldgroup?Hi all, I have 12 fields in a custom node-type. the node-title and some cck-fields. field1/1....field4........field7 Problem: I need a flow display, as all fields can have one OR more lines!!! I tried using float, absolute, .... but I can't arrange the fields in a smooth way (gaps between vertical fields, ....) How could I solve this problem?? Generating an individual views-view-***.tpl.php? Please help! Categories: Drupal
Module similar to Token but much simpler with custom replacement evaluating PHP functionHi! I am new to this community. Purpose: I want all the content published by users (comments, blog post, forum threads, etc) to be modified by my ParseText($content) function before being stored in the database, and to be modified by UnParseText($content) before being show to user for editing. So what I want is quite simple, is to be able to call those two functions, one on save event, and the other before show edit event. ParseText would analize the content and do some very complex replacements using complex rules, so in this case I think that Token module is not sufficient. Example: User enters "I like bananas as I am a monkey", however before publishing the string is modified by ParseText() which results in "I like bananas as I am a monkey". So when the content is published the special formatted text is displayed.Now when the user goes and clicks on edit, the string "I like bananas as I am a monkey" saved in database is modified by UnParsetext() and the result is that the user gets to edit "I like bananas as I am a monkey" (original inputted string).The problem is not about creating ParseText() nor UnParseText() but how to make them run on the appropiate events and modify the content. Categories: Drupal
CCK Filefield and drupal_executeDoes anyone know how to create a node with a cck filefield using drupal_execute? I have seen some similar examples, but never with filefield itself, and cannot get it to work... I've tried mith many combinations similar to this, but never got it to work. Although I've also tried the same approach for imagefield, and it works perfectly... this way: <?php Categories: Drupal
embedding a form in a node viewI am writing a module for a custom content type and has built in use of the voting api with some custom voting criteria. When displaying the node I would like to include a few different forms that update the vote associated with that node instead of having the user go the special edit page. The idea is that a user might be able to look at a view of these content types and just go down the list clicking on buttons that cast votes. The problem is that I can't seem to figure out how to get the node id in the form. This value is available when viewing the page by itself from arg(0), but not as a list. In my hook_view() I am adding the form with some code like this: $node->content['node_form'] = array( '#value' => drupal_get_form('form_name') ); I haven't found anyway to reference the node that was associated with this form so that I can execute the appropriate sql in my hook_submit function. Any help is appreciated. Categories: Drupal
ad insertions in Drupal 6... how about some sucess storiesI am interested in putting some ads in some of my Drupal sites, but not sure what direction to take. I wanted to hear about some success stories before I start. so, any comments on what to do? Categories: Drupal
user_external_loginHas anybody else had issues when creating a customised user login module? I am finding that Drupal is allowing a login (via user_external_login) by users who are blocked. There is a thread here that suggests a reason - but I assume that as it is a year ago the patch has been committed. Categories: Drupal
Book Module - Adding page number navigationFor a new 6.2 site, I'm customizing the Book module by maintaining a separate copy of book-navigation.tpl.php in my theme directory. I started by removing the tree and converting the next/previous links into buttons. Because my content can get as big as twenty pages (but more often between 6-12), I would like to include page number navigation as well. Needless to say, I could create these manually within the nodes, if I really had to. And there are at least a few other module-based solutions for this, but none that would integrate well with my current Views/CCK/Book setup (so far as I can tell). What I would really like to devise is a way to add a query to book-navigation.tpl.php that grabs the total number of pages at a given book depth and present numerical links to each of those pages. I note that this has come up before (example), but I'm not sure if anyone has actually addressed it here yet. Categories: Drupal
open default local task by defaulti want drupal open default local task automaticaly when i click on the parent menu item: Categories: Drupal
Multiple database query?I need to obtain how many threads exist on forum: function _forumstat_fetch() { The code work pretty good, I get the number in $item->nthreads; Now I want to obtain how many post (comments) exist on forum. I need to put a separate SQL query for this purpose? But db_fetch_object($res) accept only one query :( Someone know which is the best way to solve this problem ? I appreciate any idea! Thanks Categories: Drupal
Multiple node types specified within one module?Hi there. Pardon me if this is a simple question, and my apologies if it's an obvious answer and I'm just missing it in the API, if one has two (or more) node types specified in a module, is it possible to handle the separate node types in the other hooks, such as hook_insert()? For a more specific example, let's say I have module "Foo" with node types "Foo" and "Bar," where Foo and Bar both have tables reserved for them with extra content. Using the hooks, one can just use the "Foo" module to handle both the "Foo" and "Bar" database inserts, right? Thanks in advance. Categories: Drupal
How do I Query a DB and post the results -so i have TestMYSQL Query page on my website and i am trying to query and post the results of the role db, and once i can get that figured out - then i can query and post the results of another db I created titled front_page_by_role . This db has the role, description, sort, and include fields. Categories: Drupal
set form #action in hook_validate?I'm finishing a module to capture new customer information for a client. The new cust will fill out the form which includes several taxonomy terms and either email the form to my client and send a check or pay via paypal. The email portion works fine which is handled by myform_submit. For the paypal, I've included paypal's hidden fields in the form and if I set the #action to the paypal url, clicking the pay now button immediately sends me to paypal. What I want is for the pay now to first run thru myform_validate so I can set the hidden fields using form_set_value. My client is selling monthly subcriptions of three types each at a different price and, based on the package selected on the form, I will set the correct price. I have tried to set the #action in myform_validate but it does not work. If anyone can help me dynamically set the #action or has a suggestion as to how to approach this, I would greatly appreciate it. Categories: Drupal
Changes in the API with Drupal 5.7 ?Hello, I am working on a Drupal 5.7 installation. I use to work on the first version of Drupal 5 last year and developped some modules. I get in trouble with the forms. I manage to make the form page but when I submit it, it doesn't perform the actions in the hook_form_submit hook and I get to a blank page. I am wondering if something changed since I worked on the form API or if I'm doing something wrong. I have something looking like that in the hook_menu : $items[] = array( for the hook_form : function forumspec_add_form() { for the hook_form_submit :
Categories: Drupal
Change the content of a comment, how?I want to be able to change the actual text of a comment, as it is being sent to the site. I know how to do it with nodes, but when I apply the same principles to comments, it fails. Here's what I do with my nodes: 1) I hook into form_alter and add my own function to $form['#validate'] The net result is exactly what I'm looking for: if you Preview the node, or Edit it later on, the text box (and Preview) contain the modified text instead of what the author originally typed. (In case you're wondering, yes, there's a very good reason why a simple text filter isn't enough, but the details would lead us away from the issue at hand.) Then I found out it doesn't work for comments. I use the same form_alter hook. I call a separate function for validation. I can find the comment's text in $form_state, but no matter what I do, nothing I do ends up changing the text in the same way that I can with a node... As far as I can tell, the text of the comment appears in 4 places in the $form_state: Categories: Drupal
Reset To DefaultsHi, I was just wondering if there was a hook or a custom method in using the "Reset To Defaults" button on forms in the administration section? So, in conclusion I want to be able to update a database table with default values when "Reset To Defaults" is clicked. The default values will be stored in variables or an array in the actual function. Categories: Drupal
Retrieve the posted valuesDear Community, its already 2 days that I'm trying to figure out how to do the following task and still now I can't solve the problem! Please, hope some of you can give me some important tips. I've an XML file with countries, that I fatch without any problem and I show this countries into a form select. What I want to do it, post the selected value, get in a result page the posted ID and parse anoter XML file to get the righr detail for i.a. a listing of products. I can't understand how to get the value in a page set to show the listing. NOTE. 2) when I understand all this, the form submission will be more complex because I'm trying to cereate a booking hotel system, so much more parameters like data etc etc as to be sent. Please, hope someone can give me a help thanx you Categories: Drupal
Theming a moduleI have this module: <?php And this is my theme file (forumstat_mytheme.tpl.php): <table width="100%" border="1"> Categories: Drupal
Where can I hire someone to improve Drupal's comment featuresWhere can I go to gather bids for a developer to improve the way Drupal handles comments? I have some very specific ideas for a better UI but I don't have the skills to program them myself. Categories: Drupal
|
Popular contentDrupal Showcasedrupal security feed |