Welcome to the [HSX] website!

Been Gaming since 2003

Community Driven Site

Gaming, Web Development, and Support

  

 
Main Menu
 
DFG
 Home
 Join our Clan
 [HSX] Roster
 Forums
 News
 Downloads
 News Letter
 Video tutorials
 Supporters
 Uploads
 F.A.Q
· FAQ
· Docs
· Forums FAQ
 [HS] History
 Site Map
 Write a Review
 Image Repo
 WhoIs
 Twitch ID Finder
 Logout
DFG
DFG DFG DFG

 
[HSX] Donations
 
DFG
Donation
This here is a combined total of what we need to keep us going each month.

9 %

Donate

End DateMar 01
Target$50.00
Below Target$45.45
CurrencyUSD

Donators This Month
Feb 04
Wolf
$4.55
DFG
DFG DFG DFG

 
Search our Site
 
DFG DFG
DFG DFG DFG

 
Theme Management
 
DFG
DFG
DFG DFG DFG

 
Survey
 
DFG What is your favorite game to play ATM?

WarThunder
World of Tanks
H1Z1
MechWarrior Online
ARK
WarFace
SWTOR
BattleField serier
COD Series
Diablo
Armored Warfare



Results
Polls

Votes 980
Comments: 0
DFG
DFG DFG DFG

 
Honey Pot
 
DFG
Bots in the pot!
We have [1878] bots stopped!

DFG
DFG DFG DFG

     
DFG
 
Forum Index Members Search Usergroups
Ranks Staff Statistics Forum FAQ
Board Rules Edit your profile Login, Check Messages Log in
 


Search for at

Header logo
Goto page 1, 2  Next
Post new topic Reply to topic printer-friendly view List users that have viewed this topic Thank Post Forum Index Nuke Blocks / Modules Support
View previous topic View next topic
PostPosted: Mon Feb 05, 2018 4:50 am Reply with quote
airsteam
Hi Corpse, I will want to know how I can make more than one logo with my style.css

Thank you Corpse

NOOB!!!

Groups NOOB!!!
Posts 26
Joined Oct 03, 2015
Status Offline
Gender Male
View user's profile Send airsteam a private message Visit user's website Find all posts by airsteam

PostPosted: Mon Feb 05, 2018 9:40 am Reply with quote
coRpSE
What do you mean, "more than one logo"?

If your talking about having it randomly change on each page refresh, then there are several different ways, it really depends on your theme and how its set up and how you really want to go about it. You could do it with jquery, and CSS, or you can do it with PHP and CSS. Me personally, to make it easier on myself, I would just do PHP and an array. Then make the images and do it that way. But I can't say exactly how to do it because each theme is different and it really depends on your theme.


Expand

Top Dog
Nuke Dev / Coder

Groups Top Dog
Nuke Dev / Coder
Posts 2373
Joined Jan 12, 2012
Status Offline
View user's profile Send coRpSE a private message Visit user's website Find all posts by coRpSE

PostPosted: Mon Feb 05, 2018 10:31 am Reply with quote
airsteam
Ok I will look if I find a tutorial!
This is a theme I bought on clantheme (bf4_xtreme)


 

NOOB!!!

Groups NOOB!!!
Posts 26
Joined Oct 03, 2015
Status Offline
Gender Male
View user's profile Send airsteam a private message Visit user's website Find all posts by airsteam

 
PostPosted: Mon Feb 05, 2018 3:24 pm Reply with quote
coRpSE
well, if you pack up the header file or the theme itself and send it to me, I can code it in for you.

The way I would do it is like this:

PHP:  [ Select all ]

  $ran_logo = array('logo_1.png''logo_2.png''logo_3.png''logo_4.png''logo_5.png' ); // array of filenames
 
 $i rand(0count($ran_logo)-1);
 
 $dispalyed_logo "$ran_logo[$i]"

 

then where the image is displayed, I would display the logo using the URL and $displayed_logo, sortof like this.

(HTML Version)

PHP:  [ Select all ]

<img src="./themes/Your_Theme/images/<?PHP echo $displayed_logo; ?>" width="500px" height="150px" alt=""

 
(PHP Version)

PHP:  [ Select all ]

echo '<img src="./themes/Your_Theme/images/'$displayed_logo .'" width="500px" height="150px" alt="">'

 

But each theme is different and the logo could be a background image instead, or, something else may be different where a slight rewrite of the header may need to be edited/changed.

Note:
But one thing to keep in mind is to make each image the same size in width and height.


 


 Last edited by coRpSE on Mon Feb 05, 2018 9:02 pm; edited 1 time in total

Top Dog
Nuke Dev / Coder

Groups Top Dog
Nuke Dev / Coder
Posts 2373
Joined Jan 12, 2012
Status Offline
View user's profile Send coRpSE a private message Visit user's website Find all posts by coRpSE

PostPosted: Mon Feb 05, 2018 5:56 pm Reply with quote
airsteam
MP send with file lachen


 

NOOB!!!

Groups NOOB!!!
Posts 26
Joined Oct 03, 2015
Status Offline
Gender Male
View user's profile Send airsteam a private message Visit user's website Find all posts by airsteam

PostPosted: Mon Feb 05, 2018 9:44 pm Reply with quote
coRpSE
Okay, Here is an example, let me know if this is what you were looking for.

My Testsite:
Please login to see this link
Get registered or Log in


In the left blocks, you will see a "Theme Changer" block. Just select the BF4_Multi, and once you have that theme selected, look at the logo image and hit refresh a few times, you will see it change randomly. I have Test Image 1 through Test Image 5. If thats what your looking for, then the way i did that is by editing 2 files.

Open you public_html/themes/BF4_Multi/style/style.css and find

Code: [ Select all ]

#headerlogo {
   background: url("../images/header/logo.png") no-repeat;
   width:968px;
   height: 180px;
   margin:0 auto;
}


Remove the background: url("../images/header/logo.png") no-repeat; line so it will look like:

Code: [ Select all ]

#headerlogo {
   width:968px;
   height: 180px;
   margin:0 auto;
}


Save & Close


Now, open up
public_html/themes/BF4_Multi/theme.php

Find:

PHP:  [ Select all ]

echo '<div class="headbg">'


On new line before, ADD:

PHP:  [ Select all ]

  $rl = array('logo1.png''logo2.png''logo3.png''logo4.png''logo5.png');
 
 shuffle($rl);
 
 $displayed_logo array_rand($rl1); 

 

Next, Find:

Code: [ Select all ]

<div id="headerlogo"></div>


Replace with:

Code: [ Select all ]

<div id="headerlogo" style="background: url("../images/header/'. $displayed_logo .'") no-repeat;"></div>



Save & Close

Now, what you want to do is upload all your logo images into the folder
public_html/themes/BF4_Multi/images/header/

Then, you will see in the edit above, a line that looks like this:
$rl = array('logo1.png', 'logo2.png', 'logo3.png', 'logo4.png', 'logo5.png');

In between each of the quotes, ('), you want to put in the name of the image and the file type. You really want all your images as .png images and keep them the same size as the default one, which is 968 x 200.


 

Top Dog
Nuke Dev / Coder

Groups Top Dog
Nuke Dev / Coder
Posts 2373
Joined Jan 12, 2012
Status Offline
View user's profile Send coRpSE a private message Visit user's website Find all posts by coRpSE

 
PostPosted: Tue Feb 06, 2018 2:25 am Reply with quote
airsteam
Corpse, look at my capture we can put here the logo because several site put it here.

Thank you Corpse.


 

NOOB!!!

Groups NOOB!!!
Posts 26
Joined Oct 03, 2015
Status Offline
Gender Male
View user's profile Send airsteam a private message Visit user's website Find all posts by airsteam

PostPosted: Tue Feb 06, 2018 9:43 am Reply with quote
coRpSE
What capture?


 

Top Dog
Nuke Dev / Coder

Groups Top Dog
Nuke Dev / Coder
Posts 2373
Joined Jan 12, 2012
Status Offline
View user's profile Send coRpSE a private message Visit user's website Find all posts by coRpSE

PostPosted: Tue Feb 06, 2018 9:52 am Reply with quote
airsteam
Here sorry



Expand


 

NOOB!!!

Groups NOOB!!!
Posts 26
Joined Oct 03, 2015
Status Offline
Gender Male
View user's profile Send airsteam a private message Visit user's website Find all posts by airsteam

 
PostPosted: Tue Feb 06, 2018 11:15 am Reply with quote
coRpSE
Clear your browser's cache and go back to here and check to see if that's what you're looking for.
Please login to see this link
Get registered or Log in


Again, make sure your on the BF4_Multi theme.


 

Top Dog
Nuke Dev / Coder

Groups Top Dog
Nuke Dev / Coder
Posts 2373
Joined Jan 12, 2012
Status Offline
View user's profile Send coRpSE a private message Visit user's website Find all posts by coRpSE

Display posts from previous:
Post new topic Reply to topic printer-friendly view List users that have viewed this topic Thank Post All times are UTC - 7 Hours [DST enabled]
Goto page 1, 2  Next
Page 1 of 2


 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2019 phpBB Group
DFG
DFG DFG DFG
Forums ©
Copyright © HeadShotDomain 2016 By: coRpSE
SimpleBlack V2 By: Killigan
Powered By: Evolution-Xtreme