This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Working on replacement profile module, tentatively called profileplus.module - ideas wanted!

I've begun work on a replacement for profile.module, which I am tentatively calling profileplus.module

While I considered suggesting at least some of the changes I am making to profile.module itself, I'm concerned that they might add overhead while adding features that many users might not need. And yes, I'm also a little shy about making major changes to core modules, since this will be among my very first Drupal projects.

In a nutshell, I've noticed that a common need for site owners is to be able to add different field types to profile.module easily. Currently, you have to hack the hard-coded field types to do this.

What I wanted was a way to add drop-in extensions (a la Flexinode), that would add new field types to profiles easily.

While working on that project, I realized that it wouldn't be too hard to add a little more functionality - such as field types that don't refer to the built-in profile values field, and which are display-only. Sometimes, you want to have things display in a user's profile, but it doesn't necessarily need to be edited or stored as an actual user variable.

For instance, I wanted an easy way to add lists of "recent nodes by this user" so that they appear in profiles.

Well... I've got that working... but then I decided, it would really be better if some of this stuff appeared in a tabbed interface, so that every displayable profile field thing doesn't appear on the same page. The user/edit pages have a tabbed interface for different sections - I think that profile viewing ought to have the same thing, so that only the necessary information is shown at a time, instead of an enormous page (if you have lots of profile fields).

Secondary Nav and the Drupal Module

I'm really stumped. I know how to make additional Navigation Menus using menu.module and I know how to add Menu Items using hook_menu. But for the life of me I don't see a way to add Menu Items to the additional Navigation Menu from my module.

I thought maybe I was asking too much and a block would work better since that's what menu.module creates for additional menus anyways. But then I need to use menu_tree, which seems really tied to menu ids and such.

Has anyone had the same problem and figured out a way around it?

Ben

Only Single Content/edit

Hi

Iam a starter with drupal and trying to learn stuff as i go on

Iam writing a module which basically is like a form with the user preferences. I want the user to fill this only once(He can edit this though)

So I created a node type called "pref" and actually finished the form and view in the user profiles. My problem is when a user logs in into the system, he sees create content.. Sees Preferences and then creates some preferences.

Amazon Associates Tools module block to use flexinode field for keywords

I wrote a response about a request for a similar feature in this module's tracker. Since the author of the module seems like a busy person I was thinking of doing it myself but I'm a newbie to Drupal and I'd really appreciate some help.

This is the current block hook which I need to update to instead of pulling ASINs (Amazon.com product IDs) from the db will use keywords from the node (a flexinode with a textfield called book keywords or similar) and get ASINs from the db with one or all those keywords in the title. The book title is the stored in the database table along with the ASINs. What I am unsure of is how I go about accessing the textfield of a flexinode. Any help is appreciated.

<?php/**
* block hook
*/
function amazon_block($op = 'list', $delta = 0, $edit = array()) {
switch ($op) {
case 'configure': {
$output = form_textfield(t('Block title'),
'amazon_blocktitle',
variable_get('amazon_blocktitle', t('We recommend')),
30, 120, t('Enter the title for the Amazon product block'));
return $output;
}
case 'save': {
variable_set('amazon_blocktitle', $edit['amazon_blocktitle']);
}
case 'list': {
$block[0]['info'] = t('Recomended book');
return $block;
}
case 'view': {
// get the number of amazonitem records
$amazon_counter = db_fetch_object(db_query("SELECT COUNT(ASIN) AS count FROM {amazonitem}"));
$max_record = $amazon_counter->count;
// generate a random number between 1 and the count
$random = rand(0, $max_record - 1);
// get that one record
$selected_book = db_fetch_object(db_query("SELECT * from {amazonitem} LIMIT $random,1"));
$block['subject'] = variable_get('amazon_blocktitle', t('We recommend'));
$block['content'] = '

confused about drupal html links to css, images, etc

I am a little confused about the concepts that Drupal uses for determining links which show up in the pages in generates. I have a few issues with how it is done (like why does drupal do a @import for CSS rather than just link the css - @import breaks most CSS validation tools!!).

But the concern i am most confused about at the moment is what it is doing to IMG hrefs.

- i add an image using TinyMCE
- in Tiny i need to add absolute path to image as "/files/img1.jpg" - which seems wrong to me from the get go

- but now; when i view my page i do not get the image (i can see area where it should be and i see alt text)

BUT VERY ODDLY:

- i do a view source of the page which has no image (although i can see box where image should be) and save this
- then i add that page to my root and go to that static html page and the image is fine (duhhh.. and why wouldn't it be.. the source says just as it should

- so why doesnt this show in drupal????

CLUE:

- if i go to drupal page where img doesnt show and i do a properties in my browser for the missing img.. i see http://mydomain/node/files/ov.jpg

- obviously this can't work since i have no folder called "node"...

but..

- how the hell does that get there?
- why do i not see it in source?

i suspect something along the lines of the "silly" base_url thing that used to be in drupal (which was a pain!!) that was removed in 4.7.... but it is NOT there now so shouldn't be modifying my urls

TinyMCE

It seems that I'm not the only one who can't get the image upload (on the advanced theme of tinymce) to work.

Is there an easy way that I can just remove that button. I've got a site deadline for Monday and I want all of the other advanced features, but it seems naff to explain there's a button there that doesn't work.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions