1
Cuidiu
Custom Blocks Specific Page
  • 2006/6/21 17:27

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


I'm having trouble finding an existing thread on this so if there is one, please forgive the question.

I'd like to put a custom block on a specific page. For example, the registration page. I don't see a way to do this. I don't want the block to be seen in all pages of the profile module - only the registration page.

I did experiment with the SmartFAQ contextual block but I want more than a question in the block. I can hard code something in register.php but was hoping to be able to put a custom block on the right side where there's room and can be seen more easily.

Can a custom block be assigned to one page only or is it not possible?
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

2
jensclas
Re: Custom Blocks Specific Page

I am not familiar with 2.2.4 but in 2.0.13

Go to blocks admin

scroll below existing blocks tp add a new block
Under 'visible in' you can select whichever page you want it to show up in. You can create as many custom blocks as you like this way - for every page there can be something different. Just make sure the titles are relevant and distinctive from other block names. HTH

3
Cuidiu
Re: Custom Blocks Specific Page
  • 2006/6/21 21:09

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Hi jensclas,
Quote:
Under 'visible in' you can select whichever page you want it to show up in.
Thanks for your reply.

I have both versions and for some reason I don't see a place where I can select or specify the register.php page.

There are only modules and/or some general pages in the module but register.php isn't one of them.
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

4
jensclas
Re: Custom Blocks Specific Page

Hmmm - registration.php is not a 'module'...it's an individual file so you can't do the 'block thing' like this. I guess...you will need help from a coder...and sorry to say that isn't me

5
Cuidiu
Re: Custom Blocks Specific Page
  • 2006/6/21 22:05

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Thanks jensclas,
Quote:
Hmmm - registration.php is not a 'module'...it's an individual file so you can't do the 'block thing' like this.

I believe you can do this in 2.2.4. Here are the pages from the Extended Profiles module that are listed in the "Visible in" selection list:
Member Info
Edit Member
Search
Unfortunately, Registration isn't one of them. Would be nice if I could add it.
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

6
jensclas
Re: Custom Blocks Specific Page

As I said I don't know 2.2.4...perhaps you can put it in as a request for future versions.

7
gestroud
Re: Custom Blocks Specific Page
  • 2006/6/21 22:22

  • gestroud

  • Home away from home

  • Posts: 1538

  • Since: 2004/12/22


Make a backup copy of your page before you try this.


echo "
YOUR TEXT HERE.
"
;

8
Cuidiu
Re: Custom Blocks Specific Page
  • 2006/6/21 22:23

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Good idea. Thanks, jensclas.
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

9
Cuidiu
Re: Custom Blocks Specific Page
  • 2006/6/21 22:28

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Hi gestroud,
Quote:
Make a backup copy of your page before you try this.

Is that to modify register.php? I was hoping to be able to add a custom block to it.
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

10
Cuidiu
Re: Custom Blocks Specific Page
  • 2006/6/21 22:59

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


Okay. I was able to add a custom block to register.php by modifying the xoops_version.php and modinfo.php. Does anyone know of any reason why I should not have a custom block there? Would this make things less secure or anything of that sort? Otherwise, it seems to work just fine though I haven't tried registering yet.
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

Login

Who's Online

261 user(s) are online (76 user(s) are browsing Support Forums)


Members: 0


Guests: 261


more...

Donat-O-Meter

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

Latest GitHub Commits