www.mamboteam.com
Jx Development
Home arrow Support Forum
Wednesday, 07 January 2009
 
 
Main Menu
Home
FAQs
Portfolio
File Archive
Bug Reports
Support Forum
Development Update
Work in Progress
Web Links
Contact Me
Component Demos
Jobline Demo
Mamblog Demo
Jambook Demo
Login Form





Lost Password?
No account yet? Register
Who's Online
We have 10 guests online
Newsletter

Subscribe to our newsletter.






Donate
If you use and like my scripts, and would like further developments, please consider donating a few bucks.

External links
www.ledutveckling.com - The Yard - Utvecklaren - Rollspel.nu - Spelwebben - Gardener's Game Garage - My Pet Peeves - PSPnuts

Interesting Sites
Joomla!
Joomlahut
Netshine Joomla Tutorial
JX extensions on JED
Support Forum
Welcome, Guest
Please Login or Register.    Lost Password?
printFunction (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: printFunction
#768
printFunction 3 Years, 10 Months ago  
Hey Olle,

It's me again. I have another question which has nothing to do with one of your components.

I thought to bring this question to you because I can't find an answer to this problem on any other Mambo-forum.

I have a problem with the printFunction in Mambo. When i click the print-icon a new window opens with only the content of the page. I have to click again on the print-icon on this page to open my print-dialog. What I would like is that the print-dialog opens automaticly. I tried to find the parameters of the printFunction everywhere, but i can't find it.

Can you help me out here?
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#770
olle (Admin)
Admin
Posts: 975
graph
User Online Now Click here to see the profile of this user
Re:printFunction 3 Years, 10 Months ago Karma: 14  
You need to modify Mambo core files to accomplish this. Here's how to do it.

Step 1
Open up the file index.php and find this line (at line 110 in Mambo 4.5.1a):
Code:

<body class="contentpane">
REPLACE it with this:
Code:

<body class="contentpane" <?php if ( mosGetParam( $_REQUEST, 'print', '' ) ) { print 'onload="javascript:window.print();"'; } ?>>
Step 2 Open the file components/com_content/content.html.php and find this line, at line 455 in Mambo 4.5.1a:
Code:

$print_link = $mosConfig_live_site . '/index2.php?option=com_content&task=view&id=' . $row->id .'&Itemid='. $Itemid .'&pop=1&page='. @$page;
REPLACE it with this:
Code:

$print_link = $mosConfig_live_site . '/index2.php?option=com_content&task=view&id=' . $row->id .'&Itemid='. $Itemid .'&pop=1&print=1&page='. @$page;
The only change is that &quot;&amp;amp;print=1&quot; is added to the link. Both of these are just one line, I've split them up into several lines to make them easier to read here on the forum. Save and upload both files, and the print popup should now automatically start the print dialog.<br><br>Post edited by: admin, at: 2005/02/24 15:43
 
Report to moderator   Logged Logged  
 
Olle Johansson
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
Advertisement
Polls
Is Joomla 1.0 support needed in future releases of our extensions?
 
Latest News
Most Read
Latest Commented
The road to Jobline v1.2 (3 comments)
Usage instructions for Mamblog (16 comments)
Mamblog - User blog component (60 comments)
Jobline supports Joomla 1.5 (8 comments)
Jambook update (5 comments)
Latest Posts

More...
 
Top! Top!