CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Expose mailing content as a permalink
Pages: [1]

Author Topic: Expose mailing content as a permalink  (Read 624 times)

xcf33

  • I post frequently
  • ***
  • Posts: 181
  • Karma: 7
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.19/6.20
  • MySQL version: 5.x
  • PHP version: 5.2.6
Expose mailing content as a permalink
February 28, 2011, 07:10:18 am
Hi, We have some use case for exposing the mailing content as a permalink page (For newsletter purposes, etc).

It would be the same thing as if you view

http://www.example.com/civicrm/mailing/report?reset=1&html=1&mid=12

Which is what you see in the mailing report and click the content of the mailing with the popup window.


The necessary code I have found are

Code: [Select]
<?php

// CRM/Mailing/BAO/Mailing.php 
public function getMailingContent( &$report, &$form ) {}

// The function call at
// CRM/Mailing/Page/Report.php
CRM_Mailing_BAO_Mailing::getMailingContent( $report, $this );

?>


The only part of this I don't understand is passing of $this (Which I assume is the current page class) where in the function definition it asks for a $form reference.

What would I need to abstract and call the function outside of CiviCRM, say ... in a Drupal module?


Thanks,


Cheers!

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Expose mailing content as a permalink
February 28, 2011, 07:43:19 am

in 3.3 we introduced a new url:

civicrm/mailing/view

check: CRM/Mailing/Page/View.php

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Expose mailing content as a permalink

This forum was archived on 2017-11-26.