Hi,
I am using the image and image_assist modules to add images to text areas. This has placed an "image" link on the main page when I select "create content" from the navigation block. I really want to remove this item from the page. I have removed it from the menu block but cant find a way to remove it from the main page. Is there some php I need to edit etc or a table i need to update in the mysql database? i am open to ideas but dont know where to start on this problem.

Regards
Bypass

Comments

rivena’s picture

If I recall correctly, you would have to modify the actual module code, but I don't know the ramifications of that. Please see api.drupal.org .

Anisa.

-----------------------------------------------------------
Kindness builds stronger bonds than necessity.

www.animecards.org - 16,000 card scans and counting!
-----------------------------------------------------------

nevets’s picture

If you look under administer -> settings -> img assist you will see options for determing what pages it is used on and if it displays an icon, a link or neither.

bypass’s picture

thanks for the input but i am talking about removing image from the "create content" page, the list of content that can be created by the user and not for adding an image as a sub element to other types of textual content.
I will look at te module code and see what i can find
Bypass

rivena’s picture

I think the create content page is generated by the node module, and this function:
http://api.drupal.org/api/HEAD/function/node_add

But you would want to edit the image module, don't touch the node module.

Anisa.

-----------------------------------------------------------
Kindness builds stronger bonds than necessity.

www.animecards.org - 16,000 card scans and counting!
-----------------------------------------------------------

goose2000’s picture

Thanks, I found the hard coded page text in that function and changed it.

nevets’s picture

I believe you can simple disable the menu entry.

bypass’s picture

yes, you can remove it from the menu entry through the "administor - menus" menu but it still appears in the main column of the theme. This is where I want to remove it from. I have edited the .module file so that it doesnt display it here.
Bype

rivena’s picture

Can you post the code here so other people can see what you did?

Anisa.

-----------------------------------------------------------
Kindness builds stronger bonds than necessity.

www.animecards.org - 16,000 card scans and counting!
-----------------------------------------------------------

bypass’s picture

I changed all the statements equal to false in the below hook but then found that i couldnt uplaod an image for display using image_assist so changed the top one to true. all works fine now :)

/**
* Implementation of hook_access
*/
function image_access($op, $node) {
global $user;

if ($op == 'create' && user_access('create images')) {
return TRUE;
}

if ($op == 'update' && $user->uid == $node->uid) {
return FALSE;
}

if ($op == 'delete' && $user->uid == $node->uid) {
return FALSE;
}
}

PAAHCweb’s picture

Doesn't the "create content" page display only the options appropriate to their role? So if only admin can create an image node, that option would only be displayed for admin? Just wanted to make sure you remembered to view the page as your user would see it.

Cheers,
D. Lynn