Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post Override block file title (for most blockfiles!) 
 
I made this recently as I wanted to rename the displayed titles for some IMPortal block files, i.e. override the default block title that is given by a block file with the name entered for a block. This allows it to be done in ACP without need to change the /blocks/lang/lang_block_name.php files. Note, it doesn't work with every XS block file (they don't all use the /blocks/lang/lang_block_name.php method (standard in IMPortal) to give a title)- see Author Notes: Exceptions - Unless changes are made to the offending blocks to make them more standard in future releases... MG take note
Code: [Download] [Hide]
  1. ##############################################################  
  2. ## MOD Title: IMPortal Title Override option  
  3. ## MOD Author: MoreTeaVicar < adrian.stannard@icps2007.org >  
  4. ## MOD Description: This gives the option in blocks management  
  5. ##              of Admin Control Panel >> IMPortal  
  6. ##                  to override the default titlebar text of a  
  7. ##              block file with the block title you have entered  
  8. ##                  entered.  
  9. ## MOD Version: 1.0.0  
  10. ##  
  11. ## Installation Level: (Easy)  
  12. ## Installation Time: 5-10 Minutes  
  13. ## Files To Edit: - templates/ca_aphrodite/admin/blocks_edit_body.tpl  
  14. ##                - templates/ca_aphrodite/admin/blocks_list_body.tpl  
  15. ##                - adm/admin_blocks.php  
  16. ##                - includes/functions_portal.php  
  17. ##                - language/lang_english/lang_admin.php  
  18. ##              
  19. ## Included Files: n/a  
  20. ##############################################################    
  21. ## Author Notes: Exceptions  
  22. ##       For phpBBXS this will not override the titlebar  
  23. ##      on some files, for e.g. nav_links_block, this  
  24. ##      has the title hard-coded in:  
  25. ##      templates/ca_aphrodite/blocks/nav_links_block.tpl  
  26. ##      and the xs_news_block has its title hard-coded in:  
  27. ##      templates/ca_aphrodite/blocks/xs_news_block.tpl                 
  28. ##  
  29. ##############################################################  
  30.  


Configuring override:
ovveride1

Status of Block file title override in block listing:
ovveride2

In action - changing "Wordgraph" to "Popular Words"
ovveride3

NB: There may be other XS block files that don't use the IMPortal title naming method, besides those given in exceptions

IM Portal BlockFile Title Override.zip
Description:  
Download
Filename: IM Portal BlockFile Title Override.zip
Filesize: 1.49 KB
Downloaded: 408 Time(s)

 



 
Last edited by moreteavicar on Thu 02 Nov, 2006 19:03; edited 1 time in total 
moreteavicarSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Override block file title (for most blockfiles!) 
 
it is nice moreteavicar  

but it is useful then using one language I think
 




____________
*VOLVO CLUB*
 
difusSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Override block file title (for most blockfiles!) 
 
Thanks

Sorry, not sure what you mean about language - here you can call a block anything you want in any language, and have that name displayed instead of the default title block name, if that helps.

And for example, as standard in IMPortal, suppose you are using a blockfile... you want to call it "Site updates" or something. And then, suppose you want to have another block using the same blockfile and call it "Latest developments". Under the default system both the titles would always be displayed as the default blockfile title ... (and if you edit the block language file, whatever you put in the language file would still be labelled to both titlebars). With this, once installed, you can easily override the default to display two unique titles "Site updates" and "Latest developments".

Hence adding this mod would be one more small step to make IMPortal a CMS

The next step would be to modify the XS blocks...
And after that, to have settings like "news forum id(s)" a unique property to a block, rather than a "global" configuration (e.g. portal config and news config)...
 



 
moreteavicarSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Override block file title (for most blockfiles!) 
 
Sorry, but I don't understand what this modification is for.

Currently you can assign your own name to any block... you need just to choose no on Localize Titlebar and you are set...

Regarding News, all the settings are the ones in the news section.

Anyway I'll try to make them clearer.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Override block file title (for most blockfiles!) 
 
Argggh... you're right! I always set localise titlebar to on, just test it off (normally I use my own blockfiles without default titles anyway!) - Its not clear from its name that it means to assign the default name of the title bar... the name "default title" is much more appropriate.

Should have been obvious here:
includes/functions_portal.php

if(($lang_exist) && ($block_info[$b_counter]['local'] == 1))

Bah! And I created this mod for nothing! Oh well... it was fun...

That said... the xs block files are still not fully compatible with this system and require manual adjustment of the title name, as opposed simply setting localise titlebar to no.

Mighty Gorgon wrote: [View Post]
Regarding News, all the settings are the ones in the news section.

Anyway I'll try to make them clearer.


What I had in mind was to move the blockfile configurations on the block add/edit page, and unique to each block. The news section and portal config are global, they make every block that displays a news item to have the same content. But suppose you want a forum news block on the centre of the page, and the rss news block elsewhere, e.g. on the left/right sidebar or header/footer... Or... one forum news block reading a specific topic in one postion, and another forum news block reading something else, positioned somewhere else...

I was thinking of using javascript onchange in the option/select block file list to refresh the page on selection, and if the selection is a news block, a new config area appears on the add/edit block page to input the parameters. These then get saved in the block table as opposed to the portal config/news table. The block files are then changed to take the parameters from the block table... e.g. $block_info[$b_counter]['forum_id'] instead.
 



 
Last edited by moreteavicar on Sat 04 Nov, 2006 18:27; edited 1 time in total 
moreteavicarSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Override block file title (for most blockfiles!) 
 
Hmmm... I tried to remove the attached file in my first post, but got

SECURITY ALERT

CBACK CrackerTracker has detected a potential attack on this site with a worm or exploit script so the Security System stopped the script.

Seems also to affect posting as well as attachments   ...
 



 
moreteavicarSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Override block file title (for most blockfiles!) 
 
I think that now you should be able to remove your attachment... but you can also leave it...

Back on topic... I don't understand what you would like to add in the Block ADD/EDIT page.

I think that what is important is to add a new field for the Block Vars which is the Block ID: adding this feature you will be able to customize the Blocks Variable on a per Block basis.


I'll try to play with this soon and get back to you.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Override block file title (for most blockfiles!) 
 
OK, another example... You want to create 2 xs news blocks. One for centre page, and one for sidebar. You want the sidebar to display RSS feed only, and the centre page to display xs news entries only. You cannot configure ACP>>News>>XS News on a per block basis. Every XS news block will then display the same contents, because they are based on a single news configuration, which does not assign to Block ID.

The same applies to any news block. Example - You want to have a centre newsblock with one forum id, and another newsblock located somewhere else on the page (e.g. footer in A69) dedicated to another forum id... again, this can only be configured in the ACP>>News configuration, and is not unique to any Block ID.

So what I am thinking is to change the config so that the variables are assigned within the block table - on a block id basis...
 



 
moreteavicarSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Override block file title (for most blockfiles!) 
 
moreteavicar wrote: [View Post]
OK, another example... You want to create 2 xs news blocks. One for centre page, and one for sidebar. You want the sidebar to display RSS feed only, and the centre page to display xs news entries only. You cannot configure ACP>>News>>XS News on a per block basis. Every XS news block will then display the same contents, because they are based on a single news configuration, which does not assign to Block ID.

The same applies to any news block. Example - You want to have a centre newsblock with one forum id, and another newsblock located somewhere else on the page (e.g. footer in A69) dedicated to another forum id... again, this can only be configured in the ACP>>News configuration, and is not unique to any Block ID.

So what I am thinking is to change the config so that the variables are assigned within the block table - on a block id basis...

I'm working on it.

If you have the patience to wait me to complete the work, you'll have a brand new CMS...
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron