MSM - Please help me plan my approach (I think I’m in big trouble)
Posted: 23 June 2009 04:39 PM   [ Ignore ]  
Research Assistant
RankRankRank
Total Posts:  657
Joined  11-19-2008

he MSM can share information across sites using parameters (site=); however, you can’t have one Weblog that is accessed, with the same ID, on both Sites.  They’re distinct, separate entities.

OH CRAP! :(

So I can’t have a single web log and then use categories to push the content out to the desired site? Would using {exp:sql Select} allow for a work around?

The “solution” is to have the same weblog (e.g. news) created under each site, and then merge the content using a | in the {exp:weblog weblog=news site=A|B|C}

My client has a “core” of activity (think blog, or something blog-esque) that they want to share across 2 or 3 sites. Each site will have (mostly static) content unique to each site and that will be peppered with content from “the core”. I’m trying to avoid having them log into each site to enter news. I understand they won’t have to retype in the same news. But what I’m trying to do is keep it as simple as possible.

Log in… Add content A, B & C… Done…

And not
Log in… Add content A… Logout
Log in… Add content B… Logout
Log in… Add content C… Logout

I was also told that categories for each site are separate, and therefore have their own IDs/#.

So… now I’m totally confused as to what benefit I get from MSM if I have to manage each piece on its own. Is the only way to bring content together is via templates? Why can’t I use {exp:sql Select} and just “override” the assumption MSM makes with regards to weblogs, parms, etc.

I’m a week away from starting this project and now I’m almost sorry I took it on. I’m lost as to how I can use MSM to share content, etc. AND make it easy for my users / clients to keep things updated, etc. “Really easy to update and maintain all three sites…” was one my main selling points. Ok, I’m an idiot for not being 100% but from what I kept reading about MSM was that I could share weblogs, etc.

There’s got to be a way - or am I dead?

Profile
 
 
Posted: 23 June 2009 04:51 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  40207
Joined  05-14-2004

With the MSM, the membership is installation-wide, and they can switch sites in the CP, so they won’t need to login and logout like that.

The benefits of the MSM are many.  You *can* cross-reference data between sites, including sharing templates with embeds and co-mingling entries in a weblog entries tag.

The MSM isn’t making assumptions - it’s making weblogs and categories, things that have unique IDs in the database.

Perhaps instead of panicking you can give us an example of a piece of content and how it may need to be shared/presented on various Sites?

 Signature 
Profile
MSG
 
 
Posted: 23 June 2009 05:00 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
RankRank
Total Posts:  111
Joined  10-07-2007

Hey CA,

[Note: I have never actually tried this, nor do I know if this is kosher with the EE license… EE people please correct my errors]

If I’m understanding the path.php file correctly, you can change the default template_group / template variables.

So for SiteA, my path.php file might look like

$template_group = "siteA";
$template = "index";
$site_url = "http://www.siteA.com/";
$site_index = "index.php";
$site_404 = "siteA/404_not_found";
$site_name = 'siteA';

But for SiteB, it might look like this:

$template_group = "siteB";
$template = "index";
$site_url = "http://www.siteB.com/";
$site_index = "index.php";
$site_404 = "siteB/404_not_found";
$site_name = 'siteA';

So you’re serving 1 EE Site from 2 domains, but the 2nd domain goes to a different template.  Your template structure might seem huge, but you’d basically be putting 4 sites worth of templates in one site.  With each template, you could use EE tags to exclude/include categories as you wish.

I just found another tip about two versions of the same site.  I haven’t tried this idea either, but it sounds neat.

I have in the past used exp:query tags to construct my own special case queries like you describe.  Basically anything you can select in phpMyAdmin, you can get with that tag… you just lose out the convenience and efficiency that the built in EE tags provide.

We have 3 sites on MSM.  DealBrothers is a completely different site with different weblogs, etc, and it’s great that these sites can share users and Add-Ons (and I only have to manage/upgrade one base install).  I’m not sure I’d recommend it if you really were trying to share the exact same weblog data container across sites. 

In EE, many people talk about the Data/Template model, where the same Data can appear on multiple templates… and if that’s more the case, I would think you’d be able to manage that from one site.

Profile
 
 
Posted: 24 June 2009 08:03 AM   [ Ignore ]   [ # 3 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1211
Joined  12-18-2008

you just lose out the convenience and efficiency

I suppose you could make an argument for the loss of convenience, but unless you’re really bad at writing queries it should never be less efficient (and usually should be quite a bit more efficient).  This is because writing your own query allows you to get exactly the data you need with a query designed to select it in the best possible way.  EE doesn’t have to guess or give you anything you aren’t going to use.

That said, you probably could share the data using your single weblog using categories that each relate to each site (assuming you aren’t using the categories for anything else already).  Weblog A could have categories S1, S2.  site 1’s weblog entries tag would pull from category S1, site 2’s weblog entries tag would pull from site 1’s weblog but only from category S2.

 Signature 

EE Pro Network
eMarketSouth - web design & development, SEO, video production, and more
ExpressionEngine consulting services - complex SQL queries, .htaccess url rewriting, custom plugins/modules/extensions, template optimization, javascript/jQuery enhancements, and more!
Skype: tywangsness

Profile
 
 
Posted: 24 June 2009 08:16 AM   [ Ignore ]   [ # 4 ]  
Lab Assistant
RankRank
Total Posts:  111
Joined  10-07-2007

In terms of efficiency, I was thinking exp:query doesn’t take advantage of “Dynamic Weblog Query Caching”, but I guess that may not be true…

Profile
 
 
Posted: 24 June 2009 05:04 PM   [ Ignore ]   [ # 5 ]  
Research Assistant
RankRankRank
Total Posts:  657
Joined  11-19-2008

Thanks soooooo much.

Ok, I sounds like I can remove my diaper smile

>> Now comes a curve ball. I’m keen on using:

http://loweblog.com/freelance/article/ee-low-seg2cat-extension/

But I suspect it’s going to return the cat_ID of the site I’m in for a particular category. In other words, I’m gonna have to dupe the categories across all site.

>> Changing the subject back to the original post that started this thread.

What if I had a “base” site. A site that wouldn’t be active per se in terms of the domain name. And then just push out ALL the “core” content from there to the live sites? Does that buy me anything? (There was a reason I wanted to ask this but I forget now, sorry).

I’m not worried about the # of templates. I have a “trick” that keeps those down to a minimum. Helps for SEO too.


>> I know. I know. At some point I’m gonna have to dive in. I don’t mind a learning curve. I’m just trying to lower my mistake curve.

Btw, I would have to believe that native SQL is more efficient than {exp:}

Profile
 
 
Posted: 24 June 2009 09:11 PM   [ Ignore ]   [ # 6 ]  
Research Assistant
RankRankRank
Total Posts:  657
Joined  11-19-2008

So you’re serving 1 EE Site from 2 domains, but the 2nd domain goes to a different template.  Your template structure might seem huge, but you’d basically be putting 4 sites worth of templates in one site.  With each template, you could use EE tags to exclude/include categories as you wish.


Yes, this sounds very promising. I don’t really expect to share templates since each site will have: (1) a unique design (2) a unique set of landing page (3) The content for the landing pages of each site will have their own weblogs. All that will be pretty much static. It’s then the activity that I want to queue up and push out, and display (based on category).

Can any EE person confirm whether this approach as quoted (and listed above) is “legit”. thx

Profile
 
 
Posted: 24 June 2009 09:29 PM   [ Ignore ]   [ # 7 ]  
Research Assistant
RankRankRank
Total Posts:  657
Joined  11-19-2008

I just found another tip about two versions of the same site.  I haven’t tried this idea either, but it sounds neat.

Actually, very helpful but in a much different way. While much of the content will be the same, the designs and the domain names are unique.

That said, we’ve talk about smartphone sites. That link looks like it’ll help, thanks.

Profile
 
 
Posted: 24 June 2009 11:14 PM   [ Ignore ]   [ # 8 ]  
Lab Assistant
RankRank
Total Posts:  111
Joined  10-07-2007

But I suspect it’s going to return the cat_ID of the site I’m in for a particular category. In other words, I’m gonna have to dupe the categories across all site.

I’ve used seg2cat, and you’re right it does look in the current site, so you would have to dup categories.  One thing to beware of is that I found exp:weblog:categories to get confused if you have the same custom category field tags on both sites.  So either use different custom category field tags per site, or use custom sql to specify the site id you want.

What if I had a “base” site. A site that wouldn’t be active per se in terms of the domain name. And then just push out ALL the “core” content from there to the live sites? Does that buy me anything?

  It buys you not having to deal with multiple category ids definitely.  Ender’s idea sounds great.  For example site: “Smartphone Site Network” (categories: Site News, iPhone, Pre) Domains: “iPhoneIPhoneiPhone” (pulls “Site News, Iphone”)  “PrePrePre” (pulls “Sites News, Pre”).

I find this all a bit hard to talk about abstractly, since a lot of these fringe edge case conflicts are hard to recognize without template code.  Since our theory on using a core weblog and multiple categories can be done on a single license with multiple templates, why not play around with the idea on the trial?

I’m not worried about the # of templates. I have a “trick” that keeps those down to a minimum. Helps for SEO too.

  Nice!  We’re always trying to improve SEO, so I’d love to learn more if you’re willing to share.

One caveat I realized with my original concept was the fact that you’d have to find a way for all domains to use the same template group if you wanted the same url strucutre.  For example: siteA.com/index.php/article/index and siteB/com/index.php/article/index are pointing to the same template (if you don’t use MSM, but use the path.php trick).  But using the global variable trick in the article I linked to may be a way to make index a pointer to an embeded site specific template.  Like I said, these are all certainly non-typical ideas we’re floating around here, so you’re best bet is to play with it and see what you get.

Profile
 
 
Posted: 27 June 2009 03:56 PM   [ Ignore ]   [ # 9 ]  
Research Assistant
RankRankRank
Total Posts:  657
Joined  11-19-2008

first… thx again.

So either use different custom category field tags per site, or use custom sql to specify the site id you want.

at this point i’ve prepared my expectation for doing custom sql. i luv what EE has as built in but sometimes it seems easier (read: get the expected results) to bypass that.

I find this all a bit hard to talk about abstractly, since a lot of these fringe edge case conflicts are hard to recognize without template code.  Since our theory on using a core weblog and multiple categories can be done on a single license with multiple templates, why not play around with the idea on the trial?

yes, i agree about all the theory. oh… i’m 99% certain the theory is fine. i’ve kinda done it already. my BIG unknown is MSM. i just can’t seem to get enough docs to satisfy my need to know. in the meantime i’m planning so that once the clients is ready then we rock. the deal is done smile

Nice!  We’re always trying to improve SEO, so I’d love to learn more if you’re willing to share.

well, maybe i overstated things a bit but.. basically we assume that a site is made up of landing pages (read: more of less static pages) and then within those pages there are lists. the landing pages go in a single weblog and i use categories to define the pages. at that point, it’s easy for each page to have title, description, etc. the categories are also used to define relevant / targeted column content.

this is why i’ve becomes a big fan of segment_ and also want to try that plug in (so i’m not worried about having cat_id #s in the URLs).

One caveat I realized with my original concept was the fact that you’d have to find a way for all domains to use the same template group if you wanted the same url strucutre.  For example: siteA.com/index.php/article/index and siteB/com/index.php/article/index are pointing to the same template (if you don’t use MSM, but use the path.php trick).  But using the global variable trick in the article I linked to may be a way to make index a pointer to an embeded site specific template.  Like I said, these are all certainly non-typical ideas we’re floating around here, so you’re best bet is to play with it and see what you get.

the site’s templates will be unique. it’s the core content i need to share. i’m sure i’ll figure it out. i’m just trying to prepare the best i can before i get sucked into getting it done right and quick. ok, i’ll go for being right, and i hope it doesn’t take too long smile

Profile
 
 
Posted: 20 August 2009 03:42 PM   [ Ignore ]   [ # 10 ]  
Grad Student
Rank
Total Posts:  82
Joined  07-17-2009
ender - 24 June 2009 08:03 AM

you just lose out the convenience and efficiency

I suppose you could make an argument for the loss of convenience, but unless you’re really bad at writing queries it should never be less efficient (and usually should be quite a bit more efficient).  This is because writing your own query allows you to get exactly the data you need with a query designed to select it in the best possible way.  EE doesn’t have to guess or give you anything you aren’t going to use.

That said, you probably could share the data using your single weblog using categories that each relate to each site (assuming you aren’t using the categories for anything else already).  Weblog A could have categories S1, S2.  site 1’s weblog entries tag would pull from category S1, site 2’s weblog entries tag would pull from site 1’s weblog but only from category S2.

I am dealing with this same sort of scenario. You commented to that affect on one of my posts as well. Here is my structure .... 

1. I created a NEWS weblog and set it up on siteA,
2. I created and assigned a category group to that NEWS weblog on siteA and
3. I created categories IN that category group I set up in siteA

Every news entry will be entered in on siteA AND displayed on siteA. However, siteB will need to pull certain entries that have been assigned to that weblog in that category group from a specific category IN that category group that have specific relevance to siteB. Right now here is how I have the code for siteB:

<tbody>
{exp:weblog:entries weblog="news" site="siteA" orderby="date" sort="desc" disable="member_data" limit="3" category_group="2" category="4" dynamic="off"}
<tr>
<
td class="date">
<
div class="date-tab">
{date_heading}
<span class="month">{entry_date format='%M '}</span>
<
span class="day">{entry_date format='%d '}</span>
{/date_heading}
</div>
</
td>
<
td>
{if image}<div class="thumb">{image}</div>
{/if}
<h1>{title}</h1>
<
div class="subtitle">{subtitle}</div>
<
p>{summary} <br />
<
a href="{title_permalink=site/release_display}">[full article]</a></p>
</
td>
</
tr>
{paginate}
{if
"{total_pages}" != 1}
<div class="paginate">
<
span class="pagecount">Page {current_page} of {total_pages} pages</span>  {pagination_links}
</div>
{/if}
{
/paginate}
   {
/exp:weblog:entries}
</tbody>

It won’t display anything. I can’t find anything extensive on the site parameter. Please explain what I am doing wrong.

Profile
 
 
Posted: 20 August 2009 04:27 PM   [ Ignore ]   [ # 11 ]  
Grad Student
Rank
Total Posts:  82
Joined  07-17-2009

Disregard. Mine is resolved. Instead of site=“siteA” it has to say site=“not siteA”. All works now.

Profile
 
 
Posted: 24 August 2009 02:12 PM   [ Ignore ]   [ # 12 ]  
Research Assistant
RankRankRank
Total Posts:  657
Joined  11-19-2008

Thanks DVL

Yes, my intention is the base / core site is to establish a category group that defines which sites a given row is relevant for.

My assumption (?) is that everything I want and need to do can be done in standard EE with one exception - the ability to have multiple domain names use the same backend of data/content.

I understand there’s going to be learning curve I just don’t want to take a bath and I want to be sure I can deliver what the client expects.

Profile
 
 
Posted: 25 August 2009 09:31 AM   [ Ignore ]   [ # 13 ]  
Grad Student
Rank
Total Posts:  82
Joined  07-17-2009

I was told to hire someone else to do it instead of attempting to learn EE on this project.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1743, on December 02, 2009 03:47 PM
Total Registered Members: 120481 Total Logged-in Users: 45
Total Topics: 126554 Total Anonymous Users: 24
Total Replies: 665405 Total Guests: 262
Total Posts: 791959    
Members ( View Memberlist )