1
Mechs
Custom block shortcut edit button
  • 2010/7/4 7:45

  • Mechs

  • Just popping in

  • Posts: 35

  • Since: 2007/4/16


Hi all,

I would like to add a link/button that work as a shortcut from homepage for the custom block. The shortcut edit button will only appear when we log in.

I have add the code in the system_block_dummy.html with



but i could't find the php file with function related to the template.

Or a better solution. Thanks in advance.

2
ghia
Re: Custom block shortcut edit button
  • 2010/7/4 8:07

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


/class/theme_blocks.php ?
(Not sure what you are looking for or trying to accomplish.)

3
Mechs
Re: Custom block shortcut edit button
  • 2010/7/4 8:21

  • Mechs

  • Just popping in

  • Posts: 35

  • Since: 2007/4/16


For every custom block that's created & displayed in a page, to edit the block we need to go through Admin Menu --> System --> Blocks --> custom block --> the custom block--> edit

If we have a shortcut such as a link/button to go directly to blocks edit form it would be a plus.

At the moment i have to add a link(the one in the previous post) plus the block id manually for every custom block for a shortcut.

Hope that's clear.

4
ghia
Re: Custom block shortcut edit button
  • 2010/7/4 10:17

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I think you need to add the link to the block array in function buildBlock in /class/themeblocks.php and then you can use it in your theme.

5
mariane
Re: Custom block shortcut edit button
  • 2010/7/4 11:26

  • mariane

  • Theme Designer

  • Posts: 649

  • Since: 2008/1/11


try this code in your left/right or center blocks (inside the theme)
<{if $xoops_isadmin}>&nbsp;
<
a href="<{xoAppUrl /modules/system/admin.php?fct=blocksadmin&op=edit&bid=}><{$block.id}>" title="Edit this Block" >
<
img src="<{$xoops_imageurl}>block/block-edit.png" alt="Edit this Block">a>&nbsp;
<
a href="<{xoAppUrl /modules/system/admin.php?fct=blocksadmin&op=delete&bid=}><{$block.id}>" title="Delete this Block" >
<
img src="<{$xoops_imageurl}>block/block-delete.png" alt="Delete this Block">a>&nbsp;
<
a href="<{xoAppUrl /modules/system/admin.php?fct=blocksadmin}>" title="Add New Block" >
<
img src="<{$xoops_imageurl}>block/block-add.png" alt="Add New Block">a><{/if}>

and dont forget to add small icons to the functions edit, add, delete in a folder : themes/yourtheme/block
the road of success is always under construction

6
Mechs
Re: Custom block shortcut edit button
  • 2010/7/4 12:12

  • Mechs

  • Just popping in

  • Posts: 35

  • Since: 2007/4/16


@ mariane, this way i think we have to change every themes that we want to include in our themes selection.
Thanks it is what i'm looking for.

@ ghia as always you are very helpfull & thanks. Will try to change in that php file first so no changes required in the theme. If not sucessful will use mariane's way.

7
ghia
Re: Custom block shortcut edit button
  • 2010/7/4 14:07

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
@ ghia Will try to change in that php file first so no changes required in the theme. If not sucessful will use mariane's way.
You don't need to do the change in the PHP file. Besides it still needs a change in the theme files.
So, Marianne has the perfect way to go.

Login

Who's Online

610 user(s) are online (84 user(s) are browsing Support Forums)


Members: 0


Guests: 610


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits