r/csshelp • • May 16 '13

Can't redirect..

Looked and tried 3 different codes now, nothing seems to work.

I can't redirect /r/parisians to /r/psg, and I've tried the "side" code, the "titlebox" code and the "a" code.

Help?

7 Upvotes

18 comments sorted by

2

u/[deleted] May 16 '13

2

u/[deleted] May 16 '13

I already tried that one.

4

u/[deleted] May 16 '13 edited May 16 '13

Try this one:

/* splash screen */
.side a[href$="/r/psg/"] {
position:fixed;
cursor:default;
top:0;
left:0;
width:100%;
height:100%;
background-image:url(%%splash%%);
background-position:center center;
background-repeat:no-repeat;
background-color:black;
z-index:999;
}

.side a[href$="/r/psg/"]:lang(xx) {
display:none;
}

You need an image for that one, then afterwards put this in the sidebar:

[](http://xx.reddit.com/r/psg/)

2

u/[deleted] May 17 '13

Thank you! :)

2

u/Ihmhi May 25 '13

Hey, /r/techsupportmacgyver moderator here. I was looking into implementing this for some redirects to our subreddit and it worked perfectly whereas the other results on here did not. Thanks for this, it was super helpful!

2

u/[deleted] May 25 '13

:)

Please check out my big snippet collection list for more: http://www.reddit.com/r/csshelp/wiki/moresnippets

Here it is in album form: http://imgur.com/a/549RO

2

u/Ihmhi May 25 '13

I actually did a hell of a lot of reading on the sidebar stuff to upgrade our subreddit to look and function nicer. You've been a super great help! Thanks for that, keep at it!

2

u/Ihmhi May 25 '13

Also, I just noticed that your code still appears to have a scrollbar in my implementation over at /r/tsmg. How do I remove it? Here's the CSS I used, verbatim:

/* splash screen */
.side a[href$="/r/techsupportmacgyver/"] {
position:fixed;
cursor:default;
top:0;
left:0;
width:100%;
height:100%;
background-image:url(%%tsmg-redirect%%);
background-position:center center;
background-repeat:no-repeat;
background-color:black;
z-index:999;
}

.side a[href$="/r/techsupportmacgyver/"]:lang(xx) {
display:none;
}

2

u/[deleted] May 25 '13

It's because it covers the entire page instead of shortening it, maybe try this inputting this afterwards:

body {
    overflow: hidden;
    }
.moderator .styleToggle {
    z-index: 99999;
    background-color: white;
    text-align: center;
    }

That also makes it easier for mods to remove that code if they have RES

2

u/Ihmhi May 25 '13

I implemented it and I checked it with a non-moderator account for /r/tsmg.

On the moderator account, it shows "Use Subreddit Style" and a checkbox.

On the non-moderator account, it only shows a checkbox - but the checkbox definitely works. Any idea how to fix this?

I know how to get around it with AdBlock using an element hiding rule (and I can instuct moderators how to do the same), so it isn't super important but it would be really convenient. Curse you and your introducing of useful features via CSS wizardry! d=

The scrollbar bit is absolutely gone, though. That works perfectly fine!

2

u/[deleted] May 25 '13

No, sorry if you want the checkbox to disappear again, just remove everything after the first }

2

u/Ihmhi May 25 '13

Okie dokes. Thanks a bunch, you've been super helpful!

2

u/honilee Jun 27 '13

Hi, I am trying to redirect /r/Bratzillaz to /r/Dolls and am having trouble with it. I changed

background-color:black;

to

background-color:white;

but neither one work.

Here is the /r/Bratzillaz stylesheet, which is a copy-paste of what you typed besides the black/white:

/* splash screen */

.side a[href$="/r/Dolls/"] {

position:fixed;

cursor:default;

top:0;

left:0;

width:100%;

height:100%;

background-image:url(%%redirect-image%%);

background-position:center center;

background-repeat:no-repeat; background-color:white;

z-index:999;

}

.side a[href$="/r/Dolls/"]:lang(xx) {

display:none;

}

Any advice?

2

u/[deleted] Jun 29 '13

now paste:

[](/r/Dolls) 

into your sidebar

2

u/honilee Jul 01 '13

Okay, I actually hadn't changed anything and it was working in Google Chrome, but now I'm back in Firefox and the redirect isn't working again. In order for me to continue troubleshooting, do you know if this is a common issue with Firefox or RES specifically?

2

u/[deleted] Jul 01 '13

It works fine for me on firefox

2

u/honilee Jul 01 '13

Weird. I'll just take it on faith that it works and move on then. Thanks again!

2

u/[deleted] May 16 '13

And this is a nice image, try this one :) http://thumbs.reddit.com/t5_2rksz_1.png