Fork me on GitHub

Where is variable $maincontent ?  Bottom

  • This is sort of a Xanthia question -- but sort of a general "Where are the variables?" question.

    Where is this variable defined...

    $maincontent

    I found it in master.htm

    I need to edit the HTML associated with this variable. Xanthia only enables me to edit the HTML around it, but this variable generates a lot of its own HTML, not editable in Xanthia.

    Normally I would open a thousand files and run a term search, but I'm at work and this computer only has Notepad/Wordpad.

    Your help is greatly appreciated.
  • The module itself puts that out. Lets say is the Member_List module. Which is templated, so you can just edit the templates located in yoursite.com/modules/Member_List/pntemplates or if it was the News module, it would be yoursite.com/themes/*yourtheme*/modules/News-index.htm and so forth.

    Some modules output is fully templated, some are not. Luckily in .8 all of them will be (core modules that is). Im pretty sure the Xanthia documentation talks about these different things too, which are located at http://docs.postnuke.com

    Unfortunately some of the core modules are not templated and many of the third party modules are not either. Thats when you have to get dirty and into the code (PHP files) and hack away. I have to do this way to often.

    Good luck.
  • I am comfortable hacking the code... once I find the variable. But where is it?

    The HTML output page I am having trouble with is the "Blocks > Edit" page in the Administration controls. That is the only page I am having trouble with.

    Are the administration controls considered a module? I don't see an admin module in mysite.com/modules/.

    Does that mean I should look in mysite.com/modules/Blocks/ ?

    It would seem that the Admin files, being that they don't have a module -- right? -- would be somewhere else.

    Thanks for your help.
  • what version for PN are you using? The blocks module has its own admin file, so i would look there. The variable most likely wont be listed though as its part of the API and generic for all modules. It hasnt been fully released yet, but if your wanting to change a lot of the generic admin gui, i would look into PN .76 RC3. I have it running stable on a site.
  • I am running PostNuke-0.75

    I checked out this file -- mysite.com/modules/Blocks/pnadmin.php -- but it contains no HTML. Therefore I assume it calls/refers to other files to generate the HTML.

    I understand what you are saying about the $maincontent variable being generic, but mostly I was using it as a signpost to find the relevant HTML. I had previously looked in pnadmin, but saw no HTML, therefore went looking for the $maincontent variable instead.

    Maybe I am getting in a little over my head here. But it would seem not that difficult to find out where the HTML is stated in the code. Let's assume I wanted to edit a width="100%". It seems I cannot do this in pnadmin.php (there is no mention of "100%" in pnadmin.php).

    I would consider upgrading/installing .76 RC3, but this is really the last and only issue I have with 0.75. Can I upgrade to .76? Or do I need to do a clean install?

    Thanks again.
  • The .75 version of the blocks module uses an older output methodlogy - pnHTML. The class is defined in includes/pnHTML.php. The various methods of the class generate the HTML.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • markwest...
    cool, thanks. I see where the different bits of HTML are. Hopefully I can fix the layout through this sort of "global" solution

    Basically, I'm hunting down an HTML bug that is breaking up the tabled layout of a single page. My guess is that it is a "width="100%".

    Thank you!
  • Hi,

    I had a similar problem. On the admin page, all icons were perfectly aligned using the English language settings, but whenever I switched to Dutch, all icons were displayed in one single row.

    First, I thought it would be a problem in one of the language files, but after comparing the sources files in English and Dutch, I noticed the following:
    In "/public_html /modules /Admin /pntemplates/admin_admin_adminpanel.htm" at line 7 there is written

    Quote

    x" x=$modulesperrow]-->%;">

    If you set the number of coloms to 5, the result of the calculation "99/x" is a number with decimals.
    Depending on your LOCALE settings, it can cause problems. The Dutch LOCALE, for example, uses a comma as the decimal-seperator and line 7 would be translated as:

    Quote


    I avoided the problem by changing the "99" in "100" on lines 5 and 7 in the higher mentioned file.

    I hope this was helpful.

    ps: I'm using pn0.760-RC3...
  • Cocoony

    Hi,

    I had a similar problem. On the admin page, all icons were perfectly aligned using the English language settings, but whenever I switched to Dutch, all icons were displayed in one single row.


    Not really the same issue at all... since the original poster is talking about .750 and the blocks module. This issue has already been fixed in cvs and will be corrected in rc4 (due any day now).

    -Mark

    --
    Visit My homepage and Zikula themes.
  • markwest

    rc4 (due any day now).
    -Mark


    woohoo! :)
  • 0 users

This list is based on users active over the last 60 minutes.