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.
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Where is variable $maincontent ?
-
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
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. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Apr 25, 2005
- Posts: 4
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. -
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
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. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Apr 25, 2005
- Posts: 4
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. -
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
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. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Apr 25, 2005
- Posts: 4
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! -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Dec 09, 2005
- Posts: 4
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 writtenQuote
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... -
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
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. -
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1966
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
