Welcome Guest, Not a member yet? Register   Sign In
new to codeigniter - want try ci integrate with smf
#11

[eluser]Daniel Moore[/eluser]
Yeah, I've got a site where I integrated SMF and CI this week. Now I just need to get it working with MediaWiki as well.
#12

[eluser]Tones_[/eluser]
kinda new to all of this but you can actually integrate media wiki with smf. ( i would include a link but theres a spam filter so google "Extension:SMF/Users Integration - MediaWiki")

I'm actually glad i found this topic as i want to use the member and permissions from smf in an app i'm trying to create. Thanks!
#13

[eluser]Daniel Moore[/eluser]
Yeah, I've got MediaWiki bridged to SMF for authentication, but I want to integrate the themes as well, where MediaWiki will utilize the themes from SMF. I've already figured out what I have to do, and it's going to be a real pain. I'm going to be writing new theme templates for both that will use common CSS for colors and graphics, and for things that are specific to SMF or MediaWiki, they will point to a specific CSS for that. If I use the same wrapper, colors, and graphics, I should be able to pull off something pretty nice. But it will be a lot of work doing both themes from scratch. Once I have the first one done, if I do the templates correctly, then I should be able to create new themes by changing only the CSS.

I've also got my CI setup using SMF Themes and CSS. When a user logs into the CI main page, the theme will change automatically to the theme selected in their SMF profile. I'll be completing the Ajax Chat theme integration sometime this week. (That is also integrated with the SMF database.)

When I finish fully integrating MediaWiki, SMF, Ajax Chat, and CI in this manner, then I plan on making a brand new "user profile" section that will be handled by CI, that will allow preferences to be set for SMF, MediaWiki, Chat, and the CI part all at once. Basically needing to do a "portal/CMS" with CI, with integrated MediaWiki, Chat, and SMF. I was considering integrating WordPress as well, which would make it quite a package when finished for basic social sites. I haven't really done anything in the past with theming WordPress, and not sure if that is a feasible goal, but I know the chat, wiki, and SMF can all use the same theme easily with my CI install.
#14

[eluser]Tones_[/eluser]
have you thought about using a global css file like something phpbb use where your index page calls this file, and within that file it lists your other css files
Code:
@import url("smf.css");
@import url("mediawiki.css");
@import url("ci.css");

probably would take just as much work and you're better off with the route you're taking, but it was just a thought.
#15

[eluser]Daniel Moore[/eluser]
I try not to call a css file from a css file. I just think it's bad practice. I always load what is needed in the header. That way, I can always select only the css files needed for that particular page. I might not, for example, need to load a particular css for 3 column layout in my image gallery, and I don't need to load the css layout specific to the image gallery when loading a blog page. I try to separate that stuff as much as possible to keep page load times lean.

Besides, that way I can configure SMF to use both it's own plus my customized "site wide" css (for the main wrapper and main menu at the top of the page, and global footer at the bottom), and SMF won't have the extra overhead of loading the mediawiki, chat, or other css that aren't necessary for it's function.

If you only load what is needed at the moment, instead of loading up everything you have just in case you might need it, then you'll run a leaner, faster site and save bandwidth at the same time. If you load everything you have on every page load on the site, you're just going to anger your dial-up users.

But thanks for the thought. Smile
#16

[eluser]Aleksi[/eluser]
Hi there. I should probably have introduced myself more formally elsewhere, but this topic addresses an immediate need, so I'll do a brief introduction here.

I've been coding for many years, specializing in computer graphics. I'm only recently learning web technology. I looked at a variety of frameworks and codeigniter is a masterpiece in my opinion: it's elegant, efficient, and intuitive. I'm picking up php and web tech very quickly with it, so kudos to all involved for developing such a great framework.

Forums will comprise an important part of the website I'm developing. I looked at a variety of them, and SMF is by far the best one I've come across. I see I'm not the first to wonder how to integrate the two. Most of my questions about integrating them have been answered in a variety of places (sharing databases, sessions, users, etc), but I haven't been able to figure something out, hence this post.

I'm using the layout approach discussed by Josh Highland to build up my pages in sections, and it's been working quite nicely. However, I want to wrap the SMF forum within a CI view. SMF has an "above" and "below" layout structure, so using Josh's strategy it's conceptually easy to imagine how to solve this. But if SMF exists outside the CI directory structure (as recommended above), how do I load my SMF index.template.php theme inside my CI view?

I want to be able to do something like the following in my forum controller:

Code:
$data["title"] = "My Little Pony"
$layout["layout_css"] = asset_url().'/css/base.css';
$layout["layout_header"] = $this->load->view('header', $data, True);
$layout["layout_footer"] = $this->load->view('footer', $data, True);
$layout["layout_contents"] = $this->load->view('forum', $data, True);
$this->load->view('final_page', $layout);

But the SMF forum "pages" are not a view in CI; instead, they're in SMF, far far away... Do I bring them to CI? How? Do I use ugly relative paths? I feel like there's a simple solution I'm just not seeing for lack of experience.

I will greatly appreciate any insights into how to solve this. Thank you.
#17

[eluser]Daniel Moore[/eluser]
I've taken a completely different approach. First, I designed a theme that would work both with SMF and my CI site. I don't load SMF from within CI. I don't really think that's a good approach, as it is a completely separate application.

I defined my theme directory in SMF to point to my CI theme directory. I use a layout template there from my CI, and SMF points to the same location, so they share CSS files and template files, although they use different template files for the most part. The "above" and "below" portions are common, however, and prevents me from having to make changes to multiple files should I change the layout.

You can change the theme directory in SMF's Admin panel under Configuration->Themes and Layout->Theme Settings by scrolling to the bottom and changing base path and base url to themes directory.

My 2 cents.
#18

[eluser]Aleksi[/eluser]
Thanks, Daniel. That seems like a much simpler approach. Seems like mixing the streams would be asking for a world of pain.




Theme © iAndrew 2016 - Forum software by © MyBB