Jump to content

wadboram

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

wadboram's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It's PHP Simple Blog h**p://sourceforge.net/projects/sphpblog/
  2. I'm trying to integrate FB comments under the articles on my PHP blog but I couldn't figure out how to do this? FB comments is found here h**ps://developers.facebook.com/docs/reference/plugins/comments/ My blog is located here h**p://www.blog.aiwwan.com any one can help?
  3. I have added the below code to my the top of my sendmessage.php file to prevent users in my site to share emails and URLs but this doesn;t work. What could be wrong with the code? Should I call the functions anywhere ? function sanitize_message( $message , $email = true, $numbers = true, $url = true ) { $message = strip_tags( $message ); if($email) { //strip email address $email_regexp = "[_A-Za-z0-9-]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(\.[A-Za-z]{2,3})"; $message = ereg_replace($email_regexp, '', $message); } //eliminate url from message if($url) { $url_regexp = "(https?://)?(www\.)?([a-zA-z0-9\.])*[a-zA-Z0-9]*\.[a-z]{2,3}"; $message = ereg_replace($url_regexp, '', $message); } //eliminate all the bad words $bad_words = array("skype", ".net", ".com", "org", "biz", "@", "yahoo.com", "gmail", "hotmail", "mail", "e-mail", "msn", "dot",); $message = str_ireplace($bad_words, '', $message); return $message; }
  4. I want to add a referral system to my membership site that saves cookies. Where the steps go like this: Registration >> Member info. entered in database, and referral link given out like mysite.com/ref.php?id=xxx >> Page has sql/php coding which then adds +1 in the users referral row. I found this code <?php include("connect.php"); //make sure we connect to the database first $user = $_GET['user']; if(!$user){ //echo out site normally } else { $sql = mysql_query("SELECT * FROM members WHERE user='$user' LIMIT 1"); $row = mysql_fetch_array($sql); $referal = $row['users_referals']; //Get whats in that field $referaladd = $referal +1; //I am not sure on this as ive not used math operators in php before, but basically your adding one onto whats in the db $add = mysql_query("UPDATE members SET users_referals = '$referaladd' WHERE user = '$user'"); //Update the db with the users referals echo "You were refered by $user"; //echo out rest of the site } ?> Does this help?
  5. I managed to fix it the primitive way cause I couldn't trace where the error is? Backed up everything,installed a fresh clean script and update necessary file. It took me around 3 hours.
  6. I'm having a membership site (PHP script) allowing members to have a conversation in the forms of send/receive forms. These messages are saved inside the database (Inbox) When I translated the language files and ran the script, all the Arabic translated text showed questions marks. so I added AddDefaultCharset WINDOWS-1256 line inside the .htaccess file and everything worked fine. The character encoding in the browser is showing (Arabic Windows 1256) Then when testing to send/receive messages between members, I got strange characters like this ظ…ط­ظ…ط¯ طµظ„ط§ط­ ط§ظ„ط¯ظ?ظ† in both their mail boxes and also inside the database. But when I change the browser's character encoding to UNICODE (UTF-, these messages appear right showing Arabic characters but the whole site's Arabic text shows question marks? I think there's a conflict in the encoding for the site... Can anyone help?
  7. When using this form to send emails I got symbols in my emails (especially when typing Arabic characters) ? for the English characters it's OK http://www.blog.aiwwan.com/contact.php
  8. @Kira thanks I just added the text-align: right; in the main content part in the code and it worked
  9. @Kira you meant I change that in the style.css ? actually the articles are saved as a text file on the site. @xyph thanks for the link, but how can I change the direction and the articles are written in a built in text editor and doesn't have alignment tab options?
  10. Hi, When I post Arabic articles to my new blog, the alignment of text is like English so how can I align the text to be from right to left. as shown below: http://www.blog.aiwwan.com/
  11. I'm having 2 problems after translating a membership site script into Arabic (RTL): 1. Sending of emails are having symbols and not right language (Confirmation emails that is sent after new member register) 2. Trying to submit Arabic data in forms but the script won't allow this. It consider them empty as if it never reads them. I should write English in forms Any one could help?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.