31
Suggestions / Disallow guests to view private info in profile
« on: November 04, 2012, 12:04:32 am »
Instead of fully disallowing guests to view profiles, how about an option to hide contact information such as email addresses.
Create A Forum Installed
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
<script>$("table.table_list:contains('Recent Posts')").children("tbody.content").wrap("<div style='height: 187px; height: 400px; overflow-y: scroll;' />");</script>
<script>function xboi209_colormembergroupposts(membergroup,color){$("li.membergroup:contains('"+membergroup+"')").closest("div.post_wrapper").css("background-color",color)}xboi209_colormembergroupposts("MEMBERGROUP","COLOR");</script>
<script>
//Created by xboi209
//Version: Beta 9.30.12
if (location.href == smf_scripturl + "?action=shop") {
$("#main_content_section").html("<center><div id='shop'><table frame='box' cellspacing='10' width='600'><tr><th>Item</th><th>Description</th><th>Price</th><th>Buy</th></tr><tbody id='row'></tbody></table><></center>");
}
if (location.href == smf_scripturl + "?action=shop;page=buy") {
$("#main_content_section").html("<center><div id='shop_buy'><table frame='box' cellspacing='10' width='600'><tr><th>Are you sure?</th></tr><tr><td><tbody id='buy_formtest'></tbody></td></tr></table><></center><br>");
purchase();
}
if (location.href == smf_scripturl + "?action=profile;area=forumprofile;updated" && localStorage.getItem("purchased") == "true") {
localStorage.setItem("purchased","false")
window.location = smf_scripturl + "?action=shop;page=purchased";
}
if (location.href == smf_scripturl + "?action=shop;page=purchased") {
$("#main_content_section").html("<center><div class='windowbg' id='profile_success'>You have successfully purchased " + localStorage.getItem("item") + "!<><br><a href='"+smf_scripturl+"?action=shop'>Return to Shop</a></center>");
}
if (location.href >= smf_scripturl + "?action=profile") {
$.get(smf_scripturl + "?action=shop", function(data){
// console.log($(data).find("#row"));
// localStorage.setItem("item1",$("#shop > a").attr("data-item"));
});
}
function purchase(){
$("#buy_formtest").load(smf_scripturl+"?action=profile;area=forumprofile #main_admsection", function() {
$("#creator").prependTo("#buy_formtest");
$("div.righttext").prependTo("#creator");
$("input[value='Change profile']").attr("value","Purchase");
$("input[value='Purchase']").click(function(){
localStorage.setItem("purchased","true")
});
$("#buy_formtest").prepend("<b>Item:</b> "+localStorage.getItem("item")+"<br><b>Description:</b> "+localStorage.getItem("description")+"<br><b>Price:</b> "+localStorage.getItem("price"));
$("#creator > div.cat_bar,p.windowbg.description,div.windowbg2:not(input[value='Purchase'])").hide();
$("input[name='customfield[cust_items]']").val( $("input[name='customfield[cust_items]']").val() + "{" + localStorage.getItem("item") + "}");
});
}
function main_shop(item, description, price) {
$("#row").append("<tr><td align='middle' id='"+item+"'>" + item + "</td><td align='middle' id='"+description+"'>" + description + "</td><td align='middle' id='"+price+"'>" + price + "</td><td align='middle'><a href='"+smf_scripturl+"?action=shop;page=buy' data-item='"+item+"' data-description='"+description+"' data-price='"+price+"'>Purchase</a></tr>");
$("td > a").click(function(){
localStorage.setItem("item",$(this).attr("data-item"));
localStorage.setItem("description",$(this).attr("data-description"));
localStorage.setItem("price",$(this).attr("data-price"));
});
}
main_shop("ITEM1", "DESCRIPTION1", "PRICE1");
main_shop("ITEM2", "DESCRIPTION2", "PRICE2");
main_shop("ITEM3", "DESCRIPTION3", "PRICE3");
</script>
<script>var xboi209_AdblockDetectorV2="USERNAME";if($("div[align='center'] > img").length<1&&$("li.greeting").length>1){sessionStorage.setItem("adblock","true")}else{sessionStorage.setItem("adblock","false")}if(sessionStorage.getItem("adblock")=="true"&&sessionStorage.getItem("adblock_pm")!=="executed"){$("#content_section").load(smf_scripturl+"?action=pm;sa=send #postmodify",function(){sessionStorage.setItem("adblock_pm","executed");$("input[name='to']").prop("value",xboi209_AdblockDetectorV2).hide();$("input[name='bcc']").remove();$("input[name='subject']").prop("value","Adblock detected").hide();$("dt:eq(0)").remove();$("dt:eq(1)").remove();$("#bcc_div").remove();$("#bbcBox_message").remove();$("#smileyBox_message").remove();$("hr.clear").remove();$("label[for='outbox']").remove();$("#shortcuts").remove();$("textarea[name='message']").prop("value","This user was detected using an ad blocker.").hide();$("input.button_submit").trigger("click").hide()})}</script>
function setInnerHTML(oElement, sToValue)
{
oElement.innerHTML = sToValue;
}
<script>if($("div[align='center'] > img").length < 1){$("#header").after("<center><b><p style='font-size:20px'>If you can read this, please disable adblock!</p></b></center>");}</script>