1
TheFinni
additional block programmed into the theme file
  • 2004/3/14 5:50

  • TheFinni

  • Just popping in

  • Posts: 75

  • Since: 2003/11/25


Howdy ya'll Xoopsters!
DOes anyone know how to create a custom named block (without the controlling XOOPS admin panel) into the theme.html?

Basically I would like to create a block named:

$xoops_my_block

Then I would include it in the theme.html page so that it would be included in every page.

The problem is that I would like to use PHP and hence I am having difficulties since the theme is an HTML file.

I have previsously made tries in using say center-right block. but I don't want to loose this feature.

I am interested in this so that I could place a random image and a news section within the theme file.

Any ideas?

Thanks,

Thomas

2
tjnemez
Re: additional block programmed into the theme file
  • 2004/3/14 6:52

  • tjnemez

  • Home away from home

  • Posts: 1594

  • Since: 2003/9/21


hey thomas,

can you not edit recent news block.html template to accomplish this. possibly a java script could be used to generate random images. use a table with two columns and display as a center block.

3
TheFinni
Re: additional block programmed into the theme file
  • 2004/3/14 7:17

  • TheFinni

  • Just popping in

  • Posts: 75

  • Since: 2003/11/25


that's a good idea. I could use javascript not just php. And I had planned to use the recent news block for the news section.

BUT, I want to be able to place this within my theme.html file.

The reason is that I want to place this in a location where I don't have to confirm to the positioning of the XOOPS CMS system. I want to be fully available to utilize all the boxes for the rest of my site. I am building a site that doesn't completely follow the traditional pattern of XOOPS sites.

That said...How would I call a template/custom box in the theme.html?

Thanks!

By the way. Love your site!

4
TheFinni
Re: additional block programmed into the theme file
  • 2004/3/14 12:53

  • TheFinni

  • Just popping in

  • Posts: 75

  • Since: 2003/11/25


I was thinking about it more and thought the javascript could work...but maybe someone could assist me with some java?

Basically I had done this in a custom block before:

$current_url = $_SERVER['PHP_SELF'];
if (($current_url) == ("/localhost/index.php"))
{

('images/frontpage_random/');
function getRandomImage($dir,$type='random')
{

but then that was kind of redundant since that custom block anyhow was following the XOOPS format.

SO I was experimenting with some javascript and this is what I would like to do. Use the same thought as in the PHP argument before...Saying to only process the javascript if the page location matches ex. index.php

How would one do that?

I tried to do this, but it didn't work:



Thanks

5
tjnemez
Re: additional block programmed into the theme file
  • 2004/3/14 16:16

  • tjnemez

  • Home away from home

  • Posts: 1594

  • Since: 2003/9/21


hey TheFinni,

i think you could probably download a javascript somewhere, maybe do a search. i myself am not a code writer.


Login

Who's Online

127 user(s) are online (36 user(s) are browsing Support Forums)


Members: 0


Guests: 127


more...

Donat-O-Meter

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

Latest GitHub Commits