الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

كيف اعمل هذي الحركة لمنع النقل؟؟!

مغلق
بدأه ابتسم في 14 سبتمبر 2004 · 4 رد · 503 مشاهدة · في منتدى تصميم صفحات الويب
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم ورحمة والله وبركاته

هناك خاص لمنع النقل يظهر رسالة حقوق الطبع محفوظة عند ضغط الزر الايمن و لكن يمكن نقل عن طريق Edit

لفتني موقع التالي

http://www.sahab.ws/4964/news/3090.html

الذي لا يستجيب لخاصية الزر الايمن او التظليل النص فكيف اصنع هذه الحركة

و جزاكم الله خيرا.

#2

بالنسبة للزر اليمين، هذا كود جافا سكريبت جيد تضعه في الـ head من الـ html من صفحتك:

<script language="JavaScript">
IE4plus = (document.all) ? true : false;
NS4 = (document.layers) ? true : false;

function clickIE()
{
    return false;
}

function clickNS(e)
{
	if (e.which==2 || e.which==3) 
     {
       return false;
     }
}
if (!IE4plus) 
{
   document.captureEvents(Event.MOUSEDOWN || Event.MOUSEUP);
   document.onmousedown=clickNS;
   document.onmouseup= clickNS;
   document.oncontextmenu=clickIE; // For NS 6+
} 
elsArts & Entertainment
Automotive
Cities & Towns
Computing & Technology
Education
Food & Drink
Health & Fitness
History
Hobbies & Games
Home & Garden
Homework Help
Industry & Business
Jobs & Careers
Money
News & Issues
Parenting & Family
People & Relations
Religion & Spirituality
Shopping & Style
Small Business
Sports & Recreation
Teens
Travele 
{
   document.onmouseup= clickIE;
   document.oncontextmenu=clickIE;
}

</script>

هذا الكود مأخوذ من : javascript.about.com/library/scripts/blnorightclick.htm

أما بالنسبة لمنع اختيار النص، ضع كود جافا سكريبت هذا في الـ head من الـ html:

<script language="JavaScript1.2">

function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>

و هو مأخوذ من dynamicdrive.com/dynamicindex9/noselect.htm

Mohamad Al-Karbi

www.mkarbi.me

#3
<style>
<!--

/* no source */

.skin0{
position:absolute;
width:150px;
border:1px solid #000000;
background-color:#EEEEEE;
font-family:Verdana,Time news roman;
line-height:24px;
cursor:default;
font-size:12px;
z-index:100;
visibility:hidden;
}

.menuitems{
padding-left:10px;
padding-right:10px;
}
-->
</style>

in body section

<div id="ie5menu" class="skin0" onMouseover="highlightie5(event)" onMouseout="lowlightie5(event)" onClick="jumptoie5(event)" display:none>
<div class="menuitems" url="http://health.groups.yahoo.com/group/muslimdoctors">Our Yahoo Group</div>
<div class="menuitems" url="http://www.msdoctors.medmuseum.com/forum">Our Forums</div>
<div class="menuitems" url="http://anwarica.tripod.com/main.htm">Designer's Website</div>
<div class="menuitems" url="mailto:anwarica2000@yahoo.com">Email Me</div>
</div>

<script language="JavaScript1.2">

//set this variable to 1 if you wish the URLs of the highlighted menu to be displayed in the status bar
var display_url=1

var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all
if (ie5||ns6)
var menuobj=document.getElementById("ie5menu")

function showmenuie5(e){
//Find out how close the mouse is to the corner of the window
var rightedge=ie5? document.body.clientWidth-event.clientX : window.innerWidth-e.clientX
var bottomedge=ie5? document.body.clientHeight-event.clientY : window.innerHeight-e.clientY

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<menuobj.offsetWidth)
//move the horizontal position of the menu to the left by it's width
menuobj.style.left=ie5? document.body.scrollLeft+event.clientX-menuobj.offsetWidth : window.pageXOffset+e.clientX-menuobj.offsetWidth
else
//position the horizontal position of the menu where the mouse was clicked
menuobj.style.left=ie5? document.body.scrollLeft+event.clientX : window.pageXOffset+e.clientX

//same concept with the vertical position
if (bottomedge<menuobj.offsetHeight)
menuobj.style.top=ie5? document.body.scrollTop+event.clientY-menuobj.offsetHeight : window.pageYOffset+e.clientY-menuobj.offsetHeight
else
menuobj.style.top=ie5? document.body.scrollTop+event.clientY : window.pageYOffset+e.clientY

menuobj.style.visibility="visible"
return false
}

function hidemenuie5(e){
menuobj.style.visibility="hidden"
}

function highlightie5(e){
var firingobj=ie5? event.srcElement : e.target
if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode //up one node
firingobj.style.backgroundColor="highlight"
firingobj.style.color="white"
if (display_url==1)
window.status=event.srcElement.url
}
}

function lowlightie5(e){
var firingobj=ie5? event.srcElement : e.target
if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode //up one node
firingobj.style.backgroundColor=""
firingobj.style.color="black"
window.status=''
}
}

function jumptoie5(e){
var firingobj=ie5? event.srcElement : e.target
if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){
if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode
if (firingobj.getAttribute("target"))
window.open(firingobj.getAttribute("url"),firingobj.getAttribute("target"))
else
window.location=firingobj.getAttribute("url")
}
}

if (ie5||ns6){
menuobj.style.display=''
document.oncontextmenu=showmenuie5
document.onclick=hidemenuie5
}

</script>

تجد تطبيقه على الصفحة الاولى http://www.msdoctors.medmuseum.com

لاحل له الا الذهاب للقائمة تحرير ثم view source وهو لمنع الزر الايسر .. واعتقد انه من dynamic drive ولكنه كان عندى بالارشيف ... هناك سكريبتات اخرى لتشفير المحتوى وهى رائعة بنفس موقع الدينامك :)

#4

ألا أدلك على خير من هذه الأكواد الطويلة؟

إحتسب أجرك عند الله و كفى به شهيدا على انك المؤلف الأصلى لموقعك

و هذا ما فعلت http://www.techarabia.tk

#5

شكراً اخي إبراهيم، و نوعاً ما أوافقك الرأي. لأني كنت من هواة جعل مواقعي محمية، و لكن وجدت من تجوالي في المنتديات الغربية أن الجميع يعارض هذه الفكرة بل يسعى معظمهم إلى اختراق الموقع أو تخريبه إذا كان يحوي مثل هذه الأكواد لإثبات مهارته و إثبات أن الحماية كانت ضعيفة. و أنظروا إلى مواقع الـ Hacking و الـ Cracks كمثال على ذلك. أما قولي "نوعاً ما" فهو أن من حق كل شخص حماية عمله و إن كان يحتسب الأجر على الله، فإن المؤمن كيس فطن

و أنا لا اجد سبباً للحماية سوى حمايو منطقة الأعضاء في الموقع او ملفات لا تنزل إلا من قبل جهات معينة و ماعدا ذلك لا أرى سبباً للحماية.

و الأكواد السابقة ضعيفة، فإذا أردت الأفضل فجرب هذا البرنامج الرائع. ليس سعره مرتفعاً او تستطيع الحصول على crack له:

HTML Protector

وهو يؤمن جميع أنواع الحماية لصفحات html وينجح في بعض الحالات مع ASP و يشفر الصفحات جميعها و له عيبان خطيران: الأول، سيصبح حجم موقعك كبير جدا و بطئ. و الثاني، يجب يحفظ نسخ احتياطية من موقعك و إلا لم تستطيع استرداد الأصل بعد التشفير

تم تعديل هذه المشاركة بواسطة محمد القربي في 16 سبتمبر 2004 في 19:11

Mohamad Al-Karbi

www.mkarbi.me

هذا الموضوع مغلق.

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…