SMF For Free Support Forum
Signup For Free Forum
December 04, 2008, 08:38:15 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: [1]
  Print  
Author Topic: [Code] Post Background  (Read 1279 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Moderator
*****
Offline Offline

Posts: 669


Do not PM me for Code Support or Request


View Profile
« on: September 22, 2007, 07:49:58 pm »

Footers
Code:
<script>
if(location.href.match(/topic,/i)) {
feild = document.getElementsByTagName("div");
//Created by Agent Moose (smcodes.smfforfree3.com)
for(q=0;q<feild.length;q++) {
if(feild[q].innerHTML.match(/Post Background: (.+?)</i) && feild[q].className == "smalltext") {
feild[q].parentNode.parentNode.parentNode.style.backgroundImage = "url('"+RegExp.$1+"')";
feild[q].parentNode.parentNode.parentNode.style.backgroundRepeat = "no-repeat";
feild[q].parentNode.parentNode.parentNode.style.backgroundPosition = "center center";
feild[q].innerHTML = feild[q].innerHTML.replace(/Post Background: (.*)/i, "");
};};};
</script>

This will change the background of your users posts.  The users will get to choose there own background too.  Also, there is no Jquery.

There are a couple of this you need to do first.
First, create a new profile feild. (Admin CP>Features and Options>Custom Profile Feilds>Add Feild)
Now, when you create the feild, make sure the drop-down menu says Text.  Now there will be a link called [Setting].  Click it.  Then use this information:

Name: Post Background
Feild Description: URL of your Post Background Image
Show In Profile?  Checked
Show In Posts?  Show Under Post Count
Parse BBC?  Unchecked
Text to display before field (BBC is ok if enabled above): Leave Blank
Text to display after field (BBC is ok if enabled above): Leave Blank
Field ID: post_background
Add a horizontal rule before field?  (Your Choice)
Show field on registration?  (Your Choice)
Only allow admins to edit field? Unchecked
Only allow admins to view field? Unchecked

Once done with that, Click the button that says Save.

Now, All you have to do is go to your Profile to edit it(Profile>Forum Profile Information>Post Background[it is at the bottom])

Just place the URL of your image there!
« Last Edit: September 22, 2007, 07:54:08 pm by Agent Moose » Logged



SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.[/cen
BadgerGirl*naf
SMF For Free Full Member
*
Offline Offline

Posts: 138



View Profile WWW
« Reply #1 on: September 23, 2007, 11:36:20 am »

Congrats man.. i like it
Logged

Isaiahs Grandma
SMF For Free Sponsors
*
Offline Offline

Posts: 275



View Profile WWW
« Reply #2 on: January 28, 2008, 11:49:43 am »

Forum Url: http://ourhangout.smfforfree4.com
How do you get the members using this post count to show? I can see the background  but no post count!
Logged

simply sibyl
Female Type
Global Moderator
*
Offline Offline

Posts: 9429


Please do not PM for Support


View Profile WWW
« Reply #3 on: January 28, 2008, 11:54:42 am »

It "could" be that the color of the background image is around the same as the font color used for those areas.    If so either change the background image to one that the fonts will show up on or edit the css and change the font colors.
Logged

Isaiahs Grandma
SMF For Free Sponsors
*
Offline Offline

Posts: 275



View Profile WWW
« Reply #4 on: January 28, 2008, 11:57:53 am »

Forum Url: http://ourhangout.smfforfree4.com
I've tried several colors and it still doesnt show, even if I put just white for a color. i know the codes are working because it still shows up on non full members posts.
Logged

simply sibyl
Female Type
Global Moderator
*
Offline Offline

Posts: 9429


Please do not PM for Support


View Profile WWW
« Reply #5 on: January 28, 2008, 12:20:49 pm »

Forum Url: http://ourhangout.smfforfree4.com
I've tried several colors and it still doesnt show, even if I put just white for a color. i know the codes are working because it still shows up on non full members posts.

well humm I dunno then.
Is the code itself changing the font color?
(another one for Moose to answer)
Logged

Isaiahs Grandma
SMF For Free Sponsors
*
Offline Offline

Posts: 275



View Profile WWW
« Reply #6 on: January 28, 2008, 12:26:29 pm »

Forum Url: http://ourhangout.smfforfree4.com
Yes I have for my profile, and my gang members. The background shows for them, no post count.Take a peek on my forum and you will see what I mean. It shows up on Junior members, and less membership, where the back ground is not being used
Logged

glough
SMF For Free Member
*
Offline Offline

Posts: 26



View Profile
« Reply #7 on: January 29, 2008, 02:49:10 pm »

It's a little annoying. Like sometimes your can't see the text they type.
Logged

You know... some people think Im weird...

 psst... they're right



ViSiT mY cItY!!!! Click this link:

http://www.glough-placeo.myminicity.com/  wootz!

OR!

http://www.glough-placeo.myminicity.com/ind
Isaiahs Grandma
SMF For Free Sponsors
*
Offline Offline

Posts: 275



View Profile WWW
« Reply #8 on: January 29, 2008, 05:33:22 pm »

Forum Url: http://ourhangout.smfforfree4.com
I agree, I changed to a different style, it was just to much green for me too!
Logged

Agent Moose Jr.
SMF For Free Sr. Member
*
Offline Offline

Posts: 443


View Profile WWW
« Reply #9 on: March 17, 2008, 04:18:59 pm »

one problem when you enter the code and you put ur background it removes your posts any way to fix it?
Logged

New Graphic!

Abstract
LaundryLady
Global Moderator
*
Offline Offline

Posts: 3083


Multi-Tasking Maven


View Profile
« Reply #10 on: March 18, 2008, 02:03:59 pm »

How about posting the code as you are using it and/or the forum url with the code in place so that someone can see what you are talking about?
Logged
Agent Moose Jr.
SMF For Free Sr. Member
*
Offline Offline

Posts: 443


View Profile WWW
« Reply #11 on: March 18, 2008, 02:12:30 pm »

i had it on my other forum i think because in the code it says post maybe its removing it because when you make the profile field it doesnt show up so maybe its removing both
Logged

New Graphic!

Abstract
LaundryLady
Global Moderator
*
Offline Offline

Posts: 3083


Multi-Tasking Maven


View Profile
« Reply #12 on: March 18, 2008, 02:34:49 pm »

*Looks for Intergalactic Translation Book*  Hun, that made no sense to me, sorry.
Logged
Celebrus
SMF For Free Hero
*
Offline Offline

Posts: 830


Previously known as Omikron


View Profile WWW
« Reply #13 on: March 18, 2008, 10:40:02 pm »

It hides the profile field in posts, not the entire posts.
Logged


Raven78
SMF For Free Newbie
*
Offline Offline

Posts: 14



View Profile
« Reply #14 on: May 20, 2008, 12:11:57 am »

Very neat^^
Logged


Pages: [1]
  Print  
 
Jump to:  

cheap low cost web hosting reviews

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.272 seconds with 18 queries.