Auburn
Not New Member
Posts: 34
Auburn said 0 great things
|
Post by Auburn on Dec 2, 2010 11:34:28 GMT -8
I realize the difficulties out there with adding profile comments onto proboards, however I have an idea! It's a bit complicated and would require not only a code but some tweaking of board settings/etc, but here goes: Concept Summary:: The admin creates a hidden category, and a board (id=comments) within that category. This board would be the storehouse for everyone's profile comment threads, which will be linked to their profiles via an iframe. Below is a really rough idea of what I mean: auburntest1.proboards.com/index.cgi?action=viewprofile&user=adminThe code I'm using to cause this at the moment is: <script type="text/javascript"> if(location.href.match(/on=viewpr/)){ document.write('<iframe src ="/index.cgi?action=display&board=comments&thread=4#comx" width="100%" height="1200" frameborder="no" scrolling="no"></iframe>'); } </script>Concept Elaboration: A script/code will run whenever a profile page is visited that retrieves a [tangent=similar to how al ot of other codes store info in the signature. It would be something like {PcT:4} where 4 is the thread number, and PcT stands for Profile Comment Thread]thread number[/tangent] from the signature of whoever's profile it is and inserts it into an iframe's [tangent=in the form of an '+pct+' variable, for instance, ...board=comments&thread='+pct+'...]src="url"[/tangent], loading the proper profile comment thread for that member. In order to do this, each member must also have their own thread created within this hidden board (id: comments). The incomplete/super-sketchy script I have above loads the same thread (4) on whoever's profile is visited. However, the ideal concept is to have the proper corresponding thread load, according to what the [tangent=As to how they'd get that number in their signature, maybe a script/code can be setup to prompt new members "Would you like to enable profile comments?" upon their first visit to their profile, if they say yes, they will be directed to a "&action=post" link that opens a thread in the proper boad (comments). Via alert messages, we can instruct the member to submit the thread, then maybe the page can cache the new thread's url, retrieve the thread number, and redirect to the modify profile page - inserting the data in there? This part seems very complicated but it'd only be a one time thing. <.< I'm not sure what'd be easiest/best, but I'll come back to this]information in their signature[/tangent], such as [PcT:4] says. Furthermore, I also have Todge's Reverse Post order code installed only for this board, as well as a custom quick-reply box at the top with an [tangent=in this case it's #comx]anchor[/tangent] so that the iframe shows up in the right position. Tell me if I'm just plain crazy, x3 What do you think?
|
|
wildgoosespeeder
Code Helper
Tiers are for strangers!
Posts: 530
wildgoosespeeder said 161 great things
|
Post by wildgoosespeeder on Dec 2, 2010 12:38:24 GMT -8
I find this rather interesting. ProBoards in general is long overdue for a profile overhaul and this is a step in the right direction. I noticed something and if you follow it, it will make your life easier. <script type="text/javascript"> if(location.href.match(/on=viewpr/)){ document.write('<iframe src ="auburntest1.proboards.com/index.cgi?action=display&board=comments&thread=4#comx" width="100%" height="1200" frameborder="no" scrolling="no"></iframe>'); } </script>Trust me, remove that thing in red. The reason? Click here.
|
|
Auburn
Not New Member
Posts: 34
Auburn said 0 great things
|
Post by Auburn on Dec 2, 2010 12:46:32 GMT -8
(p.s. I guess this is not so much a request as it is a concept discussion. I realize this is very complex, but I just want to know if it's theoretically doable?)
edit: Whoops! thank you wildgoose, ^^ bad habit on my part. I know better than to leave the red area.. >> fixed now.
|
|
|
Post by Wormopolis on Dec 2, 2010 20:30:37 GMT -8
I think proboards still has a frame breaker code in place so I dont think an iframe would work. I havent check ina while however.
I had a personal thread in MP code around here in requests I wrote for someone, but it just makes a link to the thread, it doesnt actually display contents.
|
|
|
Post by Wormopolis on Dec 2, 2010 20:31:41 GMT -8
p.s. I love how you utilzed the tangent code...
|
|
Auburn
Not New Member
Posts: 34
Auburn said 0 great things
|
Post by Auburn on Dec 3, 2010 9:59:56 GMT -8
Hm... it's hasn't broken yet (though maybe it's not immediate?).. And the tangent code is so awesome! ^^ *** Assuming this concept is doable, I've been thinking a bit more about the specifics of the code. And I know I'm about to embarrass myself really bad here with my noobness, but here's what I've [tangent=and what I don't have I kinda just made up in silly words <.< but I hope I can portray the general idea. I can't code properly..]got[/tangent] thus far: if(location.href.match(/(viewprofile$|viewprofile&user='+pb_username+')/) && (there's no [PcT:] in their signature) && (there's no denial cookie)){ if(confirm('Would you like to enable Profie Comments?')){ location.href="/index.cgi?board=comments&action=post"; create.approvalcookie; }else{ alert('Alrighty. You may choose to enable Profile Comments in the future by clicking the link below your signature.'); document.write('<p align="center"><a href="/index.cgi?board=comments&action=post">Enable Profile Comments</a></p>'); create.denialcookie; }Okay wait.. scratch that. An alert/confirm popping up every time you visit your profile would be annoying after a [tangent=and even if it saved a cookie/cache so that it doesn't go off again, I know some people (such as me) have their browser set to delete cookies upon closing - thus we'd have to deny the alert every day. And anything more than a cookie (i.e. directing to the modify profile page in order to save some permanent bit of info to let the script know not to prompt) would be a bit of a hassle for the user, I think]while[/tangent]. So maybe just a text based prompt? For instance: if(location.href.match(/(viewprofile$|viewprofile&user='+pb_username+')/) && (there's no [PcT:] in their signature)){ document.write('<p align="center"><a href="/index.cgi?board=comments&action=post">Click to Enable Profile Comments</a></p>'); } else { var proCom = The[PcT:]numberFromSignature; document.write('<iframe src ="/index.cgi?action=display&board=comments&thread='+proCom+'#comx" width="100%" height="1200" frameborder="no" scrolling="no"></iframe>'); }
..then for the other part of the code, something like: if(location.href.match(/index.cgi?board=comments&action=post/)){ alert('Enter a Name for your Profile Page, and a short message, then submit'); if(ThreadFormIsSubmitted){ retrieveUrlofNewLocation; var tn = extractThreadNumberFromTheThreadURL; (save tn as a cookie?)
ForceRedirectToModifyProfilePage; if(document.modifyForm && document.modifyForm.signature){ insert.innerHTML('[Pct:"+tn+"]');
alert('Please save your settings to complete the enabling process.');...or something. o,o? i fail.. I know.... I think I'll stop right there for now. I have a feeling I'm totally off somewhere in left field. *waits for your replies*
|
|
Nightwalker
Full Member
Everything Happens at Night
Posts: 138
Nightwalker said 0 great things
|
Post by Nightwalker on Dec 3, 2010 14:28:27 GMT -8
|
|
wildgoosespeeder
Code Helper
Tiers are for strangers!
Posts: 530
wildgoosespeeder said 161 great things
|
Post by wildgoosespeeder on Dec 3, 2010 15:11:44 GMT -8
Yeah, iframes will work. Really, why would it be a problem? I must me missing it.
|
|
|
Post by Wormopolis on Dec 3, 2010 18:19:11 GMT -8
I only mentioned it because there USED to be code in teh base code that orevented a proboard from loading into an iframe. it would break out of the frame and set the parent src to the iframe src. possibly to prevent anyone from accidentally creating an infinite loop with frames.
as long as you could ENSURE that whatever was loaded into the iframe wouldnt also try to load another iframe, its theoretically possible. I have to look at whatever night posted first though.
this might be a question to ask on support to get Craig/Patrick/Martyn's decision on such a code before any real work is put into it.
|
|
|
Post by Wormopolis on Dec 3, 2010 18:24:00 GMT -8
the other thing I see being a problem would be the ad. even in an iframe the ad would have to be displayed, which would mean it would stretch the page to the ad width (or worse if you use the big rectangle box).
now if you wanted the thread stuff to appear BELOW the profile possibly, then it would basically look like there were 4 ads on the page. one at the top, one at the top of the "comments" section, one at the bottom of the comments section, and then one more below that. unless you were ad free.
|
|
Auburn
Not New Member
Posts: 34
Auburn said 0 great things
|
Post by Auburn on Dec 3, 2010 19:00:24 GMT -8
I was thinking about posting it on support, but I always find your work creative/innovative so I went here first. As for the ads stretching the page, I thought about that so I set the iframe width to 100% to eliminate complications of that sort. The iframe should basically horizontally bisect the page and insert the comments. I do see what you're saying though, and there are some other little kinks that would have to be worked [tangent=for instance, the anchor in the iframe causes the main page to also gravitate to that anchor, not just the iframe. And also when a new comment is made, it doesn't return to the anchor, so that'd need to be fixed somehow too.]out[/tangent], but I think the idea is promising. ..so should I post it at Support?
|
|
|
Post by Wormopolis on Dec 3, 2010 19:15:08 GMT -8
I would at least ask at support if the iframe containing additional board material would be allowed. if they are okay with that, then the contents of the frame could be altered to just show thread contents and ads, and the buttons to post a comment.
|
|
Auburn
Not New Member
Posts: 34
Auburn said 0 great things
|
Post by Auburn on Dec 3, 2010 21:52:45 GMT -8
|
|
victory1
Full Member
Posts: 102
victory1 said 0 great things
|
Post by victory1 on Dec 4, 2010 7:50:46 GMT -8
|
|
|
Post by Wormopolis on Dec 4, 2010 9:44:20 GMT -8
that just moves the stuff already on the main page.
|
|