Category Archives: Drupal

Reorganizing Stories

So, I’ve spent a lot of time trying to build a great featureset in Drupal that would make it easy for someone to start their own story archive, either as a community, or as a single person setup. I’ve got ideas on how to make it a closed system as well, but that hasn’t been worked on yet really.

But as I also use WordPress here I’ve wondered, could what I do in Drupal be adapted to do the same in WordPress? Could I have a nice front page with all the story information, then have the chapters organized and easily paged through in WordPress… I’m thinking it’s possible. Not sure though.

I’d love to try, or find plugins that would allow me to do the same thing I do in Drupal in here. WordPress is great for simple stuff actually, and there is a reason I haven’t completely went Drupal on this page, if only so I can keep up with what WordPress for my own use. 

I’m still thinking on all the subjects.

Sharing of Knowledge

I’m a member of the Reddit group r/hfy and lately we’ve been a bit concerned for how things have been going. So one of the group mods is creating a separate website. I’ve used Drupal a lot so I’m consulting with him on it, going to see what I can do to help the process. Of course that leads me to ponder the general truth of how we share what we know. Our experiences and our skills we haven’t been trained in, that we just pick up as we go along.

It’s interesting to note that he was starting things in a similar way as I was, but I already have hit several pitfalls that I can hopefully prevent him from falling into. Future proofing the layout and site structure for the upcoming Drupal 8, keeping the number of modules down while delivering the best experience possible, things of that nature.

Now, I’ve had a few things setup here over time that I’ve tried sharing out before. Its lead me to certain opinions of things. First you should always try and pick the right tool for the right jobs. A big community and content display system defiantly qualifies for a Drupal Build. I use WordPress for this page as it’s just me and no one else, but I wouldn’t trust it for Fanbards. And if anyone ever asks me I’ll tell them that exactly.

We all learn things over time. We gain skills, abilities, and even tricks that help us out for procedures we try and create. We also, can and always have, share these tricks with others when needed. Its how things have been passed down for Centuries, from Master to Apprentice. We document them as SOP’s, Rules of Thumb, Tips and Tricks, all of those things. You find it all over forums and help pages. It’s almost as if it’s a need for us all. If you have a problem, you ask for help. When you figure out a problem you share your solution for those who might benefit. It doesn’t always work that way, and there may in fact be folks who don’t share their knowledge, but it’s very few people these days.

I’ve started using word processors to create all my articles instead of just writing in the cms I’m in. I get the benefits of Spell check and all of the other things that come with using a full on word proc. I didn’t before, but I do now. I got some help from the guys in the Drupal group on LinkedIn on how I should lay out a how-to article with all of my information. That was interesting to say the least.

The point is, we try and help where we can, and share our knowledge to help those around us. I think it’s basically something we just do. We only horde knowledge when it’s to protect ourselves, our groups, and to have some advantage over adversaries intending us harm. Within our communities we are free and clear to give everything we know away.

Entity Book

So I caved after years of hearing how I should be using Entity References over Book module for all my stories and such in the Fanbards.net archive. Book module provided built in navigation and organization of structured content and was easily handled for display, but was a pain to make easy for folk to add to.

book dev01
Figure 1 – Easy display, listing of all chapters, and a link to the next chapter.

In order to make things look good you had to add children to books. What you see above is what a Top-Level page in a book looks like. I personally have my Top-Level pages as a completely separate content type in Drupal. That’s my opinion at least that something like that should be unique, and contain all your book meta-data depending on what your books and groupings are based upon. Now, in Drupal by default if you are going to add a child-page to a Book outline you have to select said outline on the add node page you are saving at that time.

 Figure 2 - Book Outline Tab in Drupal 7.x

Figure 2 – Book Outline Tab in Drupal 7.x

Notice the default setting for Weight. That is always 0, and by default the Drupal Book module orders all your child pages alphabetically. That can lead to ordering issues if you don’t plan for it. So you have to go to the Outline tab for that book and reorder all your chapters there.

Figure 3 - Book Outline Tab
Figure 3 – Book Outline Tab

Now, if it was just me working all of this that would be fine. Find what I need, add it to the story, order it properly. Simple, easy, ok. But it’s not just me. It’s me and anyone else who wants to post to the page. So I had to work with that, find a module that would give me access to certain information in Views, and build certain structures. After a bunch of Views and Rules I managed to create something for the average user that worked. Not the best way but it worked.

Figure 4 - User Content Management Table V 1.0
Figure 4 – User Content Management Table V 1.0

This is a view of story pages from Fanbards.net. It shows all story pages that share the same author, and that author is the person that is currently logged in and requesting the view.

That was how I got a listing of stories of all users. Editing however had to be done with links that took a person away from the page for everything, even just viewing the chapters in a story.  When I tried to fix that issue with things like Views Megarows all I’d get were error 200’s, rules wasn’t letting me redirect easily at all, and a ton of other issues that major modules had to book module. And never bothered to fix.

I also had to create a drop down menu showing all the chapters in a story like every other archive site has so a user could just jump chapters if they wanted. That required me to install a completely new module to pull that information into Views. It provided a drop down menu, and I was happy with it. Even wrote up an article on here for it.

That being said everything I did before had to go out the window due to switching over to using Entity References instead. First a note on what an Entity is and why you would want to reference it. As it relates to Drupal at least, an Entity is any piece of information, taxonomy, content nodes, files, things of that nature. You would reference such things when creating something like a Group or an image gallery. Organic Groups and Node Gallery both are dependent on Entity References. It’s how they associate Group Content with the Group you are posting in, or the Gallery you are adding an Image to.

So I set up my regular content types and this time added an Entity Reference field on the Chapter Type that references Story Pages. I also added a field that was specificly meant to be an integer for Chapter Number as it relates to ordering. It defaults to an autocomplete field that allows you to add to every story page in the site. While that is not any different from a book outline tab in a book module outline, the difference is I can switch that to reference a specific View display that will ONLY show stories created by the person who is creating the chapter.

It’s not active at the moment as we go through and edit all the chapter nodes to connect to story nodes, but it is there. And After finding a documented how to article on Drupal.org that showed me how I was able to recreate the basic chapter listing block that books had. So there was that.

Recreating navigation in a story however was a big pain. I managed to recreate the Chapter Jump Menu easily enough once I figured out how to get it to display all the chapters and links, but I had a bit of a harder time getting it to do paging through chapters as a navigational link. I found a module called FreePager and after fighting it for a week was able to, with help, recreate next previous paging in a story. So there is that.

Figure 5 - Freepager and a Chapter Jump Menu showing chapters in a story.
Figure 5 – Freepager and a Chapter Jump Menu showing chapters in a story.

I also was able to finally create a Megarow View table for User Content Management for Stories. So when you click edit chapters it drops down a display that shows every chapter in the book. You can’t do dragable sorting anymore, but that seems less important. The real important thing is that now you can do some editing of your chapters without having to go through three different pages.

Figure 6 - Custom User Content Management Table 2.0
Figure 6 – Custom User Content Management Table 2.0

That pretty much sums it all up. Everything can be accomplished with Entity References, Views, and an extra module or two. What worked for me may not in fact work for you. You may in fact find better ways to accomplish this. If this helps you figure out things then let me know. This is in no way a how to, just a description of what I’ve done.

Good Luck to you.

 

Twitter Ticker

I started working my twitter displays for the site, trying to get everything to work properly and display the feeds for all the sites. Then as I’m created content panes for the Fanbards/Darkscribes/Evaficsnet/Lemontastica twitter accounts I had a thought. Why the heck should I be displaying those? I need the linked up to the Twitter Module, but I don’t really need to display the stuff I’m tweeting from there. I’m just doing things that would normally show up as an update. So I thought on it and decided something else might be a good idea.

So I setup a block to show all the twitter accounts I have setup to follow on the page. That way every time a cron run goes the site would pull in that information. The timeline gets updated and it keeps with the Twitter display requirements while keeping with the sites primary display style. I also had the idea that every time the cron is run that a story article or forum topic would be randomly tweeted to the four twitter accounts I have. That way more information could be gotten out while keeping things simple.

It’s an idea I’ll be looking into more readily as I go.

Shiny Fancy vs. What Works

I’ve been rebuild Fanbards.net/Darkscribes.org and have gotten to the point where I needed to work on presentation. Drupal guys and others recommend using radix, which is a fancy shiny theme. It is however difficult for me to get my head around. I already have to add css in in order to properly integrate the dashboard.

I have been using Footheme on the page for my theming before now. It’s simple, easy to setup a usable Adaptive Theme subtheme based on Corolla or Pixture Reloaded, and looks good enough.

Bootstrap, Twitter’s contribution to the internet, looks really fancy and can be used by anything. But it’s still difficult to get things working at times. So I’m going to stick with the easy way for now. It gets the job done, and I’m not paid so I don’t have to make everything all glossy.