1
barryc
Customising background of popup windows
  • 2009/7/12 19:04

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


Hi all,

I haven't been able to find any info on this in a search. Hope I didn't miss something. My question is whether there is a way I can customize the background of pop-up windows, specifically those for reading or sending PMs (generated by modules/pm/pmlite.php) and for searching from the Profiles admin pages (generated by <xoopsroot>/include/findusers.php). These forms seem to be coded directly in the php scripts. The theme that I used (a modified zen-ocean) doesn't look very good in these windows. I'd like to be able to use an alternative css for them or just stipulate a plain blue background, for example).

I'd appreciate any suggestions. I've posted here rather than under themes because these forms seem to be generated by core XOOPS components.

barryC
Barry Cooper
Sweet Home, Oregon

2
culex
Re: Customising background of popup windows
  • 2009/7/12 19:48

  • culex

  • Module Developer

  • Posts: 711

  • Since: 2004/9/23


As I understand the zen-ocean controls its style in popups and forms with the css styles (style.css)

.th
.odd
.table td

If you change these colors of course also the colors in th,odd,td will change all round your site.

The forms are controlled by the css style

(forms.css) here you can modify the various parts of the forms used by your theme.
Programming is like sex:
One mistake and you have to support it for the rest of your life.

3
barryc
Re: Customising background of popup windows
  • 2009/7/12 20:49

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


Yes,

I've looked through all of the css files in the zen-ocean theme and I recognize that forms.css controls the appearance of forms on the site. What I'd like to do is find a way to override the theme css just for these pop-up forms while leaving the ones on the main site intact. Just changing some components won't solve my problem.

As an example of what I mean, look at this image. It's not attractive and it's hard to read.

BC
Barry Cooper
Sweet Home, Oregon

4
ghia
Re: Customising background of popup windows
  • 2009/7/12 21:47

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


See in the form with view html source what class, id or name the form has and use this as selector in the CSS.

PS :
Tried to look at the form, but didn't have permission.
Did look at the more users online popup, and this seems not to have an ending </head> tag, nor a starting <body> tag.

5
barryc
Re: Customising background of popup windows
  • 2009/7/13 6:38

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


I had looked for css responsible for the format of the form. The popup form can be viewed here so you can use view source to look at it. As you can see, the form name and ID are both uesr_findform (presumably a typo). I can't find any css for that form name. Perhaps you mean that I should enter some CSS code to generate the background, etc. that I want?

There also appear to be html errors in this page. For example, there is a closing </html> tag after the <link> statement, followed by a <body> tag. There is a closing </body> tag at the end of the file followed by another </html>. My problem is I don't understand how these forms are generated. Are they generated by XOOPS core code? In other words, if there are errors in the html, how can it be corrected?

barryC
Barry Cooper
Sweet Home, Oregon

6
ghia
Re: Customising background of popup windows
  • 2009/7/13 7:16

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Add the following to your CSS file:
#uesr_findform {background-color:#000000;}



The first closing </html> tag should be a closing </head> tag. Do you have this tag errors also with another (eg the default) theme?

7
barryc
Re: Customising background of popup windows
  • 2009/7/13 16:51

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


Quote:
Add the following to your CSS file: #uesr_findform {background-color:#000000;}


I chose a blue color consistent with the theme, rather than black, and that makes the pop-up much more readable, although the entire background is not blue. See this link to see the effect. Incidentally, it worked even better for the PM send form, which now has a plain blue background, with no imagary from the aquarium theme. As that is a form accessible by ordinary users, I like that.

The tag errors are present in other themes. I tried default and aka-traditional (based on the theme we used to use). Furthermore, I looked at the <more> link on the XOOPS site and the tag errors are present there too.

That made me notice another issue that is indeed theme specific. Using the theme "aquarium" (modified from zen-ocean) the more link opens a full page in the same browser window. The link is:

http://www.aka.org/aka/misc.php?action=showpopups&type=online


Did it do that when you looked at it?

Using my "traditional" theme the link is:

javascript:openWithSelfMain('http://www.aka.org/aka/misc.php?action=showpopups&type=online','Online',420,350);


I have no idea at present why the aquarium (zen-ocean) them would be failing to generate the javascript part of the link. It is a problem in the original zen-ocean theme because I installed the unmodified theme and it still generates the incorrect link.

barryC
Barry Cooper
Sweet Home, Oregon

8
culex
Re: Customising background of popup windows
  • 2009/7/13 18:17

  • culex

  • Module Developer

  • Posts: 711

  • Since: 2004/9/23


To make this online module work with original poput, try this

1) make copy / backup of zen-ocean/modules/system/blocks/system_block_online.html
2) edit on-server version of same fine and replace

all code with this

With this
<{$block.online_total}><br /><br /><{$block.lang_members}>: <{$block.online_members}><br /><{$block.lang_guests}>: <{$block.online_guests}><br /><br /><{$block.online_names}> <a href="javascript:openWithSelfMain('<{$xoops_url}>/misc.php?action=showpopups&amp;type=online','Online',420,350);" title="<{$block.lang_more}>"><{$block.lang_more}></a>
Programming is like sex:
One mistake and you have to support it for the rest of your life.

9
barryc
Re: Customising background of popup windows
  • 2009/7/13 20:39

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


Thank you again. That worked in that the users online now comes up in a pop-up window. I would also like to use the plain blue background for this pop-up window but the table generated has no identifier. Do you guys have any idea where the table code is generated?

There are still tag errors in the window, by the way. I suspect that comes from core code but I'm not experienced enough to be sure.

barryC
Barry Cooper
Sweet Home, Oregon

10
ghia
Re: Customising background of popup windows
  • 2009/7/13 21:51

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
Do you guys have any idea where the table code is generated?
It is in /misc.php. Berst is to add a surrounding div tag with an id.
Quote:
There are still tag errors in the window, by the way. I suspect that comes from core code but I'm not experienced enough to be sure
Yes, it is here on XOOPS.org too. In eg case 'online' there is a missing
echo '</head><body>';

Login

Who's Online

246 user(s) are online (162 user(s) are browsing Support Forums)


Members: 0


Guests: 246


more...

Donat-O-Meter

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

Latest GitHub Commits