Website (HTML/CSS/Design) Assistance Thread

Website, internet, technology, and computer resources, discussion and assistance.

Unread postby Adam » Fri Jun 15, 2007 1:41 am

Ahh phpBB my one true enemy.
Question: Adding mods to phpBB2; how much energy and effort is it gonna take? Will I need to re-up my knowledge of html etc. in order to do them?
Basically how difficult is it?
-亚当
Adam
Scholar of Shen Zhou
 
Posts: 3108
Joined: Thu Aug 10, 2006 11:38 pm
Location: Louisiana

Unread postby James » Fri Jun 15, 2007 2:59 am

Depends on if it is your mod or someone else’s.

Mods made by other people generally come with line-by-line copy/paste instructions.
Kongming’s Archives – Romance of the Three Kingdoms Novel, History and Games
“ They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.”
  — Ben Franklin
User avatar
James
Sausaged Fish
Sausaged Fish
 
Posts: 17953
Joined: Fri Jun 14, 2002 3:21 pm
Location: Happy Valley, UT

Unread postby Adam » Sat Jun 16, 2007 3:26 am

Speaking of creating them, might I get some information on that signature work you did here? :P

Brief question:
Meta tags, worth it nowadays or not?
-亚当
Adam
Scholar of Shen Zhou
 
Posts: 3108
Joined: Thu Aug 10, 2006 11:38 pm
Location: Louisiana

Unread postby Lordyuanshu » Sat Jun 16, 2007 5:10 am

Meta Tags help your organic SEO. If you're going to go down that road try to find something to customize your page titles too.
User avatar
Lordyuanshu
Scholar of Shen Zhou
 
Posts: 1325
Joined: Wed Dec 28, 2005 8:08 am
Location: Walkthrough FAQ Guides

Unread postby James » Sat Jun 16, 2007 5:38 am

Signatures are found in three separate documents. Just search the phpbb files for the series of underscores that appears wherever a signature appears and you’ll find the strings. Add a CSS-named span tag into the mix and you can write a custom style for the signatures.

To do things like disable quotes and whatnot I had to use regular expressions and PHP. That gets much more complicated.

Adam Sisemore wrote:Meta tags, worth it nowadays or not?

Page title is among the most important elements considered for SEO (search engine optimization). Keywords are hardly important these days, but if they match up with page content they can assist (if they don’t match, your ranking will be docked—same if you spam the keyword content). Page description also has some influence in your ranking and again is ranked against the content of your page. Page description is also used by search engines to create page summaries when they have trouble managing the content of your page. This alone is very important as it will be what people read when they consider clicking on your link.
Kongming’s Archives – Romance of the Three Kingdoms Novel, History and Games
“ They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.”
  — Ben Franklin
User avatar
James
Sausaged Fish
Sausaged Fish
 
Posts: 17953
Joined: Fri Jun 14, 2002 3:21 pm
Location: Happy Valley, UT

Unread postby Adam » Wed Jun 20, 2007 8:36 pm

Edit: Thought I had it but didn't! Blargh.
Where the bleeding bloody hell do I put the span tags exactly?
So far the most I've managed is to make signatures disappear...and I dunno how the hell I even did that.

Edit 2: OK been looking for this too, how do I go about changing the rank title colors? (I don't mean like the green for a moderator, I mean the actual text as in "Scholar of Shen-Zhou" on here) It shows as black on my stupid template and is unreadable. I've fished through crap and can't find it anywhere.
The annoying part is I don't enter anything and I look at the page source and suddenly there's a span tag in the source set to 00000 yet the tag is not in -any- files I look at.
Clearly I've been not doing this for way too long.
-亚当
Adam
Scholar of Shen Zhou
 
Posts: 3108
Joined: Thu Aug 10, 2006 11:38 pm
Location: Louisiana

Unread postby James » Wed Jun 20, 2007 11:10 pm

Unless someone else here has extra time to advise phpBB hacks, I would advise posting to their primary forum. Either that, or you could do what I did and spend hours pouring over the source code to figure things out. You might have better luck with their forum. (Hint: sign up as a chick—nerds like to help chicks.)

Here’s the signature:

/viewtopic.php

REPLACE [approx ln.1130]
Code: Select all
   if ( $user_sig != '' )
   {
      $user_sig = '<br />_________________<br />' . str_replace("\n", "\n<br />\n", $user_sig);
   }

WITH
Code: Select all
   if ( $user_sig != '' )
   {
      $user_sig = '<br />_________________<br /><span class="signature">' . str_replace("\n", "\n<br />\n", $user_sig) . '</span>';
   }

I’ve modified the hell out of my code so I can only say I <i>think</i> the above example is their exact original code.

And if you are a little more comfortable programming, here is what I am using right now:

Code: Select all
   if ( $user_sig != '' )
   {
      // James: Editing signature to conform with rules
      $user_sig = preg_replace( array( '{<span style="font-weight: bold">([^<]+)</span>}', '{<span style="font-style: italic">([^<]+)</span>}' ), array( '<b>\1</b>', '<i>\1</i>' ), $user_sig );
      $user_sig = preg_replace( array( '{</?(table|tr|td|span)[^>]*>}', '{ wrote:}' ), array( '', ':'), $user_sig );
   }
Kongming’s Archives – Romance of the Three Kingdoms Novel, History and Games
“ They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.”
  — Ben Franklin
User avatar
James
Sausaged Fish
Sausaged Fish
 
Posts: 17953
Joined: Fri Jun 14, 2002 3:21 pm
Location: Happy Valley, UT

Unread postby Adam » Thu Jun 21, 2007 12:05 am

On the plus side I'm not crazy 'cause that's how I had been doing it (uhh not yer part I'm not psychc).
It turns out it was a template thing, the current template doesn't like me mucking around with the file and when I added the span tags it removed the signature on all the old posts, and whenever someone made a new one it appeared but wasn't any different than it was before.
From now on I'll just force people to use smaller fonts or take away their signatures altogether!
Tyranny is easy when there's less than 100 members.

Now if you'll excuse me I have to pretend to be a chick. :P

Oh yes and thanks for the help sir or madam.
-亚当
Adam
Scholar of Shen Zhou
 
Posts: 3108
Joined: Thu Aug 10, 2006 11:38 pm
Location: Louisiana

Unread postby James » Thu Jun 21, 2007 1:40 am

If you want more control over your site’s CSS you need to stip it out from the template files, store it in a .css file, and manually edit in all the site information (please not that this will take a little bit of work as there is PHP in the CSS file, which simply won’t fly). I’ve been doing that here and at SimRTK for a <i>very</i> long time now.

Also improves page load times and bandwidth costs.

And it totally breaks the template editor in Admin CP.
Kongming’s Archives – Romance of the Three Kingdoms Novel, History and Games
“ They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.”
  — Ben Franklin
User avatar
James
Sausaged Fish
Sausaged Fish
 
Posts: 17953
Joined: Fri Jun 14, 2002 3:21 pm
Location: Happy Valley, UT

Unread postby Adam » Thu Jun 21, 2007 10:41 pm

Thought the signature thing was gonna be harder than that. I fiddled around and finally got it set, then I disabled BBcode for Size, quote, list and code tags, it gives an error to anyone using them in their signature. Also can restrict images or image size, and no emoticons either.
I'm not completely incompetent!

I also found my way around the color issues with Rank Titles, I added a mod (bleh) to allow HTML tags in it, so I just set them to color it white so it doesn't blend in with the background...not a fix but it does the job.
-亚当
Adam
Scholar of Shen Zhou
 
Posts: 3108
Joined: Thu Aug 10, 2006 11:38 pm
Location: Louisiana

PreviousNext

Return to Foreign Kingdoms

Who is online

Users browsing this forum: No registered users and 1 guest

Copyright © 2002–2008 Kongming’s Archives. All Rights Reserved