Arrow Home arrow Forums
larger font smaller font default font Fixed screen resolution Auto adjust screen size

Joomlapolis Forums  


Getting YaNC Working With CB 1.2 RC4
Date: 2009/01/06 22:39 By: tthalken Status: User  
Karma: 1  
Fresh Joomlapolitan

Posts: 1
graphgraph
How I GOT Community Builder To Work With The Yanc Newsletter
It took me a long time of researching and pouring through code for a couple of simple fixes, but in it's current state Yanc does not work well with Community Builder. I thought I would write this to help anyone else who had to start from scratch like I did.

YaNC seems like a great product, however it seems that development has stalled. It is not native to Joomla 1.5, so you do need legacy mode enabled in Joomla.

Background
I am hosting a Joomla site through Siteground. I am currently using Joomla 1.5.8. I have Community Builder 1.2 RC4 installed. I am using the trunk version of Yanc.

I want a user to be able to manage their newsletter mailings only from Community Builder.

I am not going to go through how to install Community Builder.

Install Yanc Trunk Version
You can download the trunk version of Yanc from:
http://forum.joomla-addons.org/index.php?topic=2776.0
(Note: You must have a user account on the forum to see the download)
Install the trunk version from the downloaded file.
(NOTE: DO NOT TRY TO UPGRADE YANK TRUNK USING THE UPGRADE OPTION FROM THE YANK COMPONENT MANAGEMENT. YOU WILL KILL IT!)

Enable The Community Builder YANK Plugin
Go to the Community Builder Plugin Manager and enable the YaNC Newsletters plugin. This will add a tab to the user's profile that allows users to edit (subscribe and unsubscribe) their newsletters.

Fix Magic Quotes In Yanc
I had problems with slashes getting added to my templates and mailings. If this is not a problem for you, you can skip this step.

I use siteground as my provider. The have magic_quotes_gpc on by default. I cannot change php settings from the .htaccess file, so I need a php.ini file in each directory where the change is needed. I just created a php.ini file in the administrator directory with the setting:
Code:

 magic_quotes_gpc Off


Allowing Subscription Settings Only From Within Community Builder.
I found that Community Builder subscriptions do not work well with Yanc subscriptions. If a user subscribes and unsubscribes from Yanc the changes do not reflect properly in Community builder. Community Builder changes do reflect properly in Yanc.

I needed a way to keep the two looking the same. I decided to remove the unsubscribe option from the Yanc component configuration I turned off "Send Unsubscribe Message". In Yanc component Manage Templates I removed the [UNSUBSCRIBE] tag and gave instructions to log on to their profile and unsubscribe from there.

Users still need to confirm their subscriptions from the link on the confirmation e-mail. I changed the confirmation process to only popup that their subscription was active and then navigate to an article I wrote that explains the subscription and how to unsubscribe (this is article id 129 on my system).

This will bypass the default Yanc page where a user can subscribe and unsubscribe.

Modify the file /administrator/components/com_yanc/classes/subscriber.php under the function confirm($hash) and change the line that reads:
Code:

 echo "<script> alert('"Y_FRONT_SUBSCRIPTION_CONFIRMED "'); document.location.href='index.php?option=$option&Itemid=$Itemid';</script>\n"; to: echo "<script> alert('"Y_FRONT_SUBSCRIPTION_CONFIRMED "'); document.location.href='index.php?view=article&id=129';</script>\n";

(your article id will be different)

Now all of my subscriptions and unsubscriptions are managed from within the Community Builder profile (Newsletters) tab.
Click here to see the profile of this user The topic has been locked.


      Topics Author Date
    thread link
Getting YaNC Working With CB 1.2 RC4
tthalken 2009/01/06 22:39

CBSubs 1.0

CBSubs 1.0.3 released!

Find out more about the revolutionary new Joomla subscription system:

Info on CBSubs

CB 1.2.3 Documentation

Thank you bonus:

ProfileBook (+Blog) 1.2RC
ProfileGallery 1.2RC2
CB Privacy 1.0RC

What? Why? Where?

Click here for a yearly subscription: subscribe now

CB 1.2.3 Download

Community Builder 1.2.3
Stable and native for:
Joomla 1.5 & 1.0 & Mambo
(incl. CB 1.2.3 Installation pdf)
You need to be a registered member to download.

Full 180 pages updated
CB 1.2.3 documentation:
You need to be a CB doc subscriber to download.

CB Login