Drupal is up and running but how do I ...?

Renaming filename for image uploads

Hi,

Instead of keeping the original file names for images when they are uploaded.
I want to rename them to a format like this: "#.ext", where # is an incremental number.
Is there any modules that offer this functionality or do i have to hack img_assist/image module
to get this to work?

Regards,
- p

AJAX does not work

I have upgraded 3 sites from 4.6 to 4.7.3. When I look at them with Firefox, two display AJAX functionality (auto-completion on some fields), while one does not.

To the best of my knowledge we followed the same upgradepath for all of them (backup, replace entire Drupal-directory, upgrade database, moved "files" back and added new theme) and I can't find any error messages anywhere.

So I am wondering whether AJAX is disabled by a setting somewhere I have failed to look? Or any other tips?

Place Pager on top of Forum and make replies go to last page on submit

I've recently migrated a phpbb2 forum to drupal. Some of the migrated users are not happy because of these two issues:

1. They want a pager (page listing like next back etc) to also appear on the top of the forum (or node if I can't specialize).
2. After they post a reply, they need to be redirected to the last page of that node, not the first one.

I don't mind hacking core if I have to.

Also, if anyone knows off the top of their head how I can stop injecting the signature into the comments text area, that would be great.

Thanks for the help!

Privatemsg

This is specifically for 4.6.*
On www.unreal.ie we've been having a minor problem with the privatemsg module for quite some time now (since we moved to drupal really). The problem is that the checkboxes for the pm system were always unticked when you first went to a user's profile page.

As well as this, there was no option for an instant mail notification for a new private message.

I've modified the privatemsg_user function as follows:
case 'form':
if (user_access('access private messages') && $category == 'account') {
$checked_allow = false;
$checked_dailymail = false;
$checked_instantmail = false;
if(isset($edit['privatemsg_allow']) && ( $edit['privatemsg_allow'] || (isset($user->privatemsg_allow) && $user->privatemsg_allow)))
$checked_allow = true;

if(isset($edit['privatemsg_mailalert']) && ( $edit['privatemsg_mailalert'] || (isset($user->privatemsg_mailalert) && $user->privatemsg_mailalert)))
$checked_dailymail = true;

if(isset($edit['privatemsg_instantmailalert']) && ( $edit['privatemsg_instantmailalert'] || (isset($user->privatemsg_instantmailalert) && $user->privatemsg_instantmailalert)))
$checked_instantmail = true;

$output = form_checkbox(t('Allow private messages'), 'privatemsg_allow', 1, $checked_allow, t('Check this box to allow users to send you private messages.'));

Banners and BBCode not playing nice

I seem to be the queen of unanswerable (or maybe they're just stupid, I can't really tell :P) questions, so hopefully someone can help with this one.

I have banner, bbcode and bbcode wysiwyg installed.

bbcode wysiwyg says to edit the theme to include <script src="modules/bbcode_wysiwyg/quick_reply.js" type="text/javascript" />. So I whacked that up in the head tags under $head and $styles.

The first thing that happened was that it knocked out the banners, I guess something in their respective scripts were clashing. I played around with the order the scripts were called in, and after breaking the css I managed to get both banners and the quote thing working again.

However, it has for some reason knocked the logo askew, adding a 1px or so margin/padding/border/something to that effect to the top and left of it and thus moving it out of the nice little box it's sitting in. I overmanipulated the stylesheet trying to get it to go back to no avail. It could just be a Firefox thing seeing as the problem doesn't seem to exist in Safari, and I asked people to check it on IE for me and some are reporting that it's fine and others say the top and left padding are there (yay IE).

Does anyone have any idea how I can stop the scripts colliding (or whatever they're doing)? We're living with it at the moment coz the site owner has decided that the very slightly wonky logo is less important than having operational bbcode and banners, so knocking one of them off to fix the problem is kind of not an option :)

execute *.install

when i installed a new module, the archive .install how is open??

is in php, when open it?

Pages

Subscribe with RSS Subscribe to RSS - Post installation