vForums Support > Programming & Coding :: Code Requests & Support :: > Content Question

Content Question - Posted By ashkir (ashkir) on 29th Jul 08 at 10:47pm
Greetings request and support board at Virtual Forums! Now here’s a quest from me a bit detailed and concept art too! I promise no stick fingers. :]. Okay, no concept art. >_>. I cannot even figure out how to change the color of a graphic. XD.

I would like a code to offer a question while posting a new thread (only while posting a new thread) to ask the question, ‘Does this topic contain nudity?’. This of course is justified on an educational board for things like the statue of david. If the answer is yes, the checkbox or what so is marked a small tag should be added to the topic title like a [n].

When viewing the thread on the board display with other threads I’d like the [n] turned into a small notice. Changing the topic title from [n] Statue of David to Statue of David (has nudity). Also it may be helpful to have a small notice at the top of the thread as well, but I mainly would like the thread question part.

^_^.

Merci . :]

Re: Content Question - Posted By Michael (wrighty) on 29th Jul 08 at 11:01pm
Ok - is that the only question? And where do you want it on the page?

I wanz stick figurez

Re: Content Question - Posted By ashkir (ashkir) on 29th Jul 08 at 11:09pm
 
Ok - is that the only question? And where do you want it on the page?

I wanz stick figurez


Right above the message box most likely. :].

Also stick fingers?

http://wimg.co.uk/M9Yf0X.gif

^_^. I drew the staff team. ^_^

Re: Content Question - Posted By Michael (wrighty) on 29th Jul 08 at 11:10pm
Just a simple 'yes/no' select box?

Re: Content Question - Posted By ashkir (ashkir) on 29th Jul 08 at 11:10pm
 
Just a simple 'yes/no' select box?
Yup. ^_^

Re: Content Question - Posted By Michael (wrighty) on 29th Jul 08 at 11:11pm
Defaulted to no? Or to a ' -- ' option so that they HAVE to choose one? {Smile}

Re: Content Question - Posted By ashkir (ashkir) on 29th Jul 08 at 11:13pm
 
Defaulted to no? Or to a ' -- ' option so that they HAVE to choose one? {Smile}
Hmm. o_o. Have to choose one seems a good idea, but I'll say default to no because I don't expect too many things like this. :].

Re: Content Question - Posted By Michael (wrighty) on 29th Jul 08 at 11:13pm
Oki koki karaoke! {Cheesy}

Re: Content Question - Posted By ashkir (ashkir) on 29th Jul 08 at 11:14pm
 
Oki koki karaoke! {Cheesy}


/steals the mic
/sings offtone
/sings horribly
/kitten dies.

/runaway

Re: Content Question - Posted By Michael (wrighty) on 29th Jul 08 at 11:47pm
Try this:

<script>
/*Nudity Question
Created By Wrighty
Do Not: Rip, Repost or Claim*/

var r = {
    awr: function(){
        if(location.href.match(/post/) && !location.href.match(/topic/) && get('message','name')){
            this.a();
        }
    },
    a: function(){
        var x = get('description_title','id').parentNode.cloneNode(true);
        x.firstChild.firstChild.firstChild.innerHTML = 'Nudity?';
        x.firstChild.id = 'nudity_title';
        x.firstChild.nextSibling.id = 'nudity_field';
        x.firstChild.nextSibling.firstChild.innerHTML = '<select id = "naked"><option value = "no">No</option><option value = "yes">Yes</option></select>';
        get('description_title','id').parentNode.parentNode.insertBefore(x, get('description_title','id').parentNode.nextSibling)
        if(document.addEventListener){
            get('post_form','name')[0].addEventListener('submit', r.s,false);
        }else{
            get('post_form','name')[0].attachEvent('onsubmit', r.s);
        }
    },
    s: function(){
        if(get('naked','id').value == 'yes' && !get('subject','name')[0].value.match(/\[N\]/)){
            get('subject','name')[0].value = '[N] ' + get('subject','name')[0].value;
        }
    }
};
r.awr();
</script>


Global Footer

Re: Content Question - Posted By ashkir (ashkir) on 29th Jul 08 at 11:50pm
The question part worked. ^_^.

But the thread look

http://wimg.co.uk/BOFrbn.gif

Re: Content Question - Posted By Michael (wrighty) on 29th Jul 08 at 11:56pm
Woopsie forgot about that! {Lips Sealed}

I knew I would when I read it....

So you want it to just add it after the name (contains nudity) ... just like that?

Re: Content Question - Posted By ashkir (ashkir) on 29th Jul 08 at 11:57pm
 
Woopsie forgot about that! {Lips Sealed}

I knew I would when I read it....

So you want it to just add it after the name (contains nudity) ... just like that?
Or before it. Just enough for I can tell people, "Hey there was a warning =P"

Re: Content Question - Posted By Michael (wrighty) on 30th Jul 08 at 12:00am
<script>
/*Nudity Question
Created By Wrighty
Do Not: Rip, Repost or Claim*/

var r = {
    awr: function(){
        if(location.href.match(/post/) && !location.href.match(/topic/) && get('message','name')){
            this.a();
        }
        if(location.href.match(/board/) && !location.href.match(/action/)){
            this.t();
        }
    },
    a: function(){
        var x = get('description_title','id').parentNode.cloneNode(true);
        x.firstChild.firstChild.firstChild.innerHTML = 'Nudity?';
        x.firstChild.id = 'nudity_title';
        x.firstChild.nextSibling.id = 'nudity_field';
        x.firstChild.nextSibling.firstChild.innerHTML = '<select id = "naked"><option value = "no">No</option><option value = "yes">Yes</option></select>';
        get('description_title','id').parentNode.parentNode.insertBefore(x, get('description_title','id').parentNode.nextSibling)
        if(document.addEventListener){
            get('post_form','name')[0].addEventListener('submit', r.s,false);
        }else{
            get('post_form','name')[0].attachEvent('onsubmit', r.s);
        }
    },
    t: function(){
        var a = get('a','tag');
        for(x = 0; x < a.length; x++){
            if(a[x].innerHTML.match(/\[N\]\s/) && a[x].href.match(/view_topic/)){
                a[x].innerHTML = a[x].innerHTML.replace(/\[N\]\s/,'') + ' (contains nudity)';
            }
        }
    },
    s: function(){
        if(get('naked','id').value == 'yes' && !get('subject','name')[0].value.match(/\[N\]/)){
            get('subject','name')[0].value = '[N] ' + get('subject','name')[0].value;
        }
    }
};
r.awr();
</script>


Global Footer

Try that.

Re: Content Question - Posted By ashkir (ashkir) on 30th Jul 08 at 12:03am
Image

Yup! Thanks! ^_^.

Re: Content Question - Posted By Michael (wrighty) on 30th Jul 08 at 12:03am
{Smile}

Awesome sauze! {Cheesy}