custom module in Drupal 6.26 - drupal

I am working in Drupal 6.26. I am developing a custom module, in which i am i want to upload file in node creation page. I want an option to upload image, like there should be file upload component and a upload button. So when admin select a file and click on submit button file has to get saved in a folder and need to save the path in database. After upload the image thumbnail should appear with remove button. When the admin clicks on remove button the image thumbnail should disappear and file upload component has to displayed with upload button. On save of the node, the image path has to map with node. This is similar to cck file upload option. Please help me to do this. Thanks.

this would be a complex form using AHAH (AJAX) behaviour to both get the thumbnail displayed and the remove button functionality.
I would recommend starting off by studying the File upload and CCK code so you can define simple form using the Form API and then adding to it some AHAH magic.
You can get a good example of a AHAH module in Drupal 6 here

Related

How to change url of default button on drupal?

I need to change url of default button on drupal. On that button, the url is example/blog. And i want to changet it becomes example/blog/1.
capture of my web
First, you should enable twig engine debugging(explained here) to find out what *.html.twig files does it fire and then cover it with your custom file or change the original one.

Automatic Upload of an image SonataMediaBundle

I use SonataMediaBundle to upload my images, and now I want to upload an image and the upload were more beautiful, that is to say that when you upload the image using the button, it will appear beside with a delete button for example that resets the upload, before validation and submission of the form,
Do you have any idea how to do this?
thank you very much

Opening pdf in DotNetNuke

I have a pdf file uploaded from the filemanager, this file must be shown in a new tab when a user clicks on the download button.
For now I just create the link manually, because I don't know how else I could do it.
Is there any other way to do this (for example via the settings page)?
You could add a link to the PDF in the DNN Navigation Menu by adding a new Page, but in the URL options for the page point to the PDF file, instead of an actual DNN page.

I want to be able to upload files using jqgrid's add/edit dialgoue box

I want to upload files when adding or modifying records to a jqgrid. How is it possible? Is there some way to tinker with its Add/Edit Dialogue boxes?
Have you looked at the domos for the customised Edit Dialog? http://www.trirand.net/demoaspnet.aspx
Click on Edit, Add, Delete Rows in the menu and select Edit Form Types, which shows you how to control which controls are displayed for editing. You could use a file upload control. You will probably have to change the enctype of the post to "multipart/form-data". Not sure how to do that with jqgrid, but it shouldn't be too hard.

How can we select existing image for image field?

I need to select existing image for image field not new upload of image in drupal6X
The IMCE module lets you browse images on the server and select them for inclusion in your compose field.
Its very late but...here is the answer IMCE Filefield
Cheers!!!
There is also the ImageField Assist module. Inserting already uploaded images is as easy as clicking an image button. Some details about it (from its project page):
This module can use every single ImageField field added to any node in a Drupal 6 website, and uses ImageCache presets to display it.

Resources