Ad Space
Cloud Computing and Cloud Hosting by Rackspace
Ad Space
Cloud Computing and Cloud Hosting by Rackspace

Hosting Geared For
your CMSMS needs

CMSMS ready Hosting

Hosting Starting at $15

  • • Hosted Mail
  • • Personal Control Panel
  • • CMSMS 1.8.1 tested
  • • Lightly packed servers
  • • Intrusion Detection
  • • URL monitored
  • • Custom solutions available

Order your hosting Now

CP Blogs

Twitter after CGBlog Post

Posted by: Jeremy Bass
on Jan 17, 2010

Category:

SEO, Coding, Intermediate, CMS Made Simple

Modules Used

Twitter

Summary: Using the Twitter module, this is what you put in a UDT and attact to an event... then you'r bloging and twittering at the same time..

Ad Space

Using the Twitter module, this is what you put in a UDT and attact to an event... then you'r bloging and twittering at the same time..


global $gCms;
$twitter = $gCms->modules['Twitter']['object'];
$CGBlog = $gCms->modules['CGBlog']['object'];
    if(isset($params['summary'])){
    	$message=$params['summary'];
    }else{
    	$message=$params['content'];
    }
$message=substr($message,0, 120); 

$aliased_title = munge_string_to_url($params['title']);
$prettyurl = $CGBlog->GetPreference('urlprefix','cgblog').'/'.$params['cgblog_id'].'/'.$detailpage."/$aliased_title";
    if( $CGBlog->GetPreference('default_detailpage',-1) != -1 ){
        $prettyurl = $CGBlog->GetPreference('urlprefix','cgblog').'/'.$params['cgblog_id']."/$aliased_title";
    }
$Burl=$twitter->shortenUrls($prettyurl);

$message=$message.' '.$Burl;
$twitter->updateStatus($message, false);
Ad Space

Get Social With It

[+]

Add A Comment

[+]

Code in the picture:
Title:
Your Name(*):
Email:
Notify me of any further comments to this thread:
Website:
Comment(*):
 
Previous page: Hosting FAQ Next page: Experimental