The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

I need to know how to adjust some code

View previous topic View next topic Go down

Solved I need to know how to adjust some code

Post by FIB on July 15th 2014, 12:08 am

I found this topic and I have tried using it but I need to know how to move it left


http://help.forumotion.com/t84472-tuesday-tip-reputation-system-only-allow-positive-votes


This isn't mine I got it from the topic but its the same problem




I replaced the + with the above image ie the positive one, but how do I move them to the left:

I think my forum is phpbb2? http://draytondubsshrops.forumotion.co.uk/


Last edited by FIB on July 17th 2014, 11:31 pm; edited 2 times in total

FIB
Forumember

Male Posts : 500
Reputation : 2
Language : English
Location : UK

http://ourbulgariaforum.freeforums.eu/

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by Ange Tuteur on July 15th 2014, 8:55 pm

Hello FIB,

From the forum you provided I am seeing JavaScript in the CSS stylesheet, this will cause errors, so remove it immediately. If you're not sure please post your stylesheet here.
avatar
Ange Tuteur
Forumaster

Male Posts : 13085
Reputation : 2759
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by FIB on July 16th 2014, 1:09 am

I think I have removed it?

Code:
  $cash_update = $user_update = array();
        if ($config['cash_mod'] && $auth->acl_get('f_cash', $data['forum_id']))
        {    a.mainmenu {
vote {
    width: 16px; / *-- Width of the image chosen --* /
}
tr td div.vote {
    display: none !important;div.vote-bar {
    display: none;
}
}
   
    }    span#fa_share.fa_tbMainElement {
        display: none !important;
    }a.mainmenu {
  font-family:arial, sans-serif;
  font-size:14px !important;
}
            $cash_update = true;
            if ($config['cash_per_day'] != 0 && $user->data['user_cash'] >= $config['cash_per_day'])
            {
              if ($user->data['user_cash_date'] == date('d-m-Y'))
              {
                  $cash_update = false;
              }
              else
              {
                  $user_update = array(
                    'user_cash_date'  => "'" . date('d-m-Y') . "'",
                    'user_cash'        => $config['cash_amt'],
                  );
              }
            }
            else if ($config['cash_per_day'] != 0)
            {
              $user_update = array(
                  'user_cash_date'  => "'" . date('d-m-Y') . "'",
                  'user_cash'        => "user_cash + {$config['cash_amt']}",
              );
            }
           
            if ($cash_update)
            {
              $sql = 'UPDATE ' . CASH_AMT_TABLE . " SET cash_amt = cash_amt + {$config['cash_amt']} WHERE user_id = '{$user->data['user_id']}' AND cash_id = {$config['cash_id']}";
              $db->sql_query($sql);
              $number = $db->sql_affectedrows();
 
              if ($number < 1)
              {
                  $cash_ary = array(
                    'user_id' => $user->data['user_id'],
                    'cash_id' => $cashrow['cash_id'],
                    'cash_amt' => $cashrow['cash_post'],
                  );
                  $sql = 'INSERT INTO ' . CASH_AMT_TABLE . ' ' . $db->sql_build_array('INSERT', $cash_ary);
                  $db->sql_query($sql);
              }
            }
        }     
        //End Cash mod

        $sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . (($auth->acl_get('f_postcount', $data['forum_id'])) ? ', user_posts = user_posts + 1' : '') . (($cash_update) ? ", user_cash_date = {$user_update['user_cash_date']}, user_cash = {$user_update['user_cash']}" : '');
vote {
 width: 24px;
}
    div.vote-bar {
        display: none;
    } 

    .LGlike {
      background: #105289;
      padding: 3px;
      border-radius: 4px;
      color: #fff;
      font-size: 10px;
      font-weight: bold;
      text-shadow: -1px 0.5px #888;
      box-shadow: 1px 1px 1px #888;
      cursor: pointer;
      margin-right: 4px;
    }
    .LGvote { margin: 0 5px; }
    .LGnovote {
      filter:Alpha(opacity=50);
      opacity: 0.5;
      cursor: default;
      box-shadow: none;
      text-shadow: none;
    }

FIB
Forumember

Male Posts : 500
Reputation : 2
Language : English
Location : UK

http://ourbulgariaforum.freeforums.eu/

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by SLGray on July 16th 2014, 4:33 am

The dollar sign is used in JavaScript.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 38255
Reputation : 2577
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by Ange Tuteur on July 16th 2014, 5:11 am

Replace your CSS by :
Code:
.vote {
    width: 16px; / *-- Width of the image chosen --* /
}

tr td div.vote {
    display: none !important;
}

div.vote-bar {
    display: none;
}

span#fa_share.fa_tbMainElement {
    display: none !important;
}

a.mainmenu {
  font-family:arial, sans-serif;
  font-size:14px !important;
}

vote {
 width: 24px;
}

div.vote-bar {
    display: none;
}

    .LGlike {
      background: #105289;
      padding: 3px;
      border-radius: 4px;
      color: #fff;
      font-size: 10px;
      font-weight: bold;
      text-shadow: -1px 0.5px #888;
      box-shadow: 1px 1px 1px #888;
      cursor: pointer;
      margin-right: 4px;
    }
    .LGvote { margin: 0 5px; }
    .LGnovote {
      filter:Alpha(opacity=50);
      opacity: 0.5;
      cursor: default;
      box-shadow: none;
      text-shadow: none;
    }
avatar
Ange Tuteur
Forumaster

Male Posts : 13085
Reputation : 2759
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by FIB on July 16th 2014, 12:46 pm

Thanks Ange, I have decided to stick with the '+' instead so you can now lock this

FIB
Forumember

Male Posts : 500
Reputation : 2
Language : English
Location : UK

http://ourbulgariaforum.freeforums.eu/

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by Derri on July 16th 2014, 12:51 pm

Topic Archived


Forum Rules: :Forumotion Staff: :Appeal A Warning: :FAQ: :Tips & Tricks: :Forgotten Password/Login Issues
You need one post to send a PM
When your topic has been solved, ensure you mark the topic solved
Never post your email in public

avatar
Derri
Administrator
Administrator

Male Posts : 8503
Reputation : 591
Language : English & Basic French
Location : Scotland, United Kingdom

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by Derri on July 17th 2014, 9:43 am

Topic Reopened Upon Authors Request


Forum Rules: :Forumotion Staff: :Appeal A Warning: :FAQ: :Tips & Tricks: :Forgotten Password/Login Issues
You need one post to send a PM
When your topic has been solved, ensure you mark the topic solved
Never post your email in public

avatar
Derri
Administrator
Administrator

Male Posts : 8503
Reputation : 591
Language : English & Basic French
Location : Scotland, United Kingdom

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by FIB on July 17th 2014, 9:51 am

Can anyone help? my forum version is phpbb2? Any help would be very much appreciated. I need to get this image moved over to the left as you can see its hanging outside of the forum post page I have tried all the suggestions I have had so far but nothing has worked yet.


Thank you for re-opening this thread Derri salut


Last edited by FIB on July 17th 2014, 10:05 am; edited 1 time in total

FIB
Forumember

Male Posts : 500
Reputation : 2
Language : English
Location : UK

http://ourbulgariaforum.freeforums.eu/

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by SLGray on July 17th 2014, 9:53 am

You can tell which version you have by AP > Display.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 38255
Reputation : 2577
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by FIB on July 17th 2014, 9:56 am

Is it this?
Theme version phpBB2 (subsilver)

FIB
Forumember

Male Posts : 500
Reputation : 2
Language : English
Location : UK

http://ourbulgariaforum.freeforums.eu/

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by SLGray on July 17th 2014, 10:02 am

Yes, it is.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 38255
Reputation : 2577
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by FIB on July 17th 2014, 10:04 am

Ok Now I know thank you

FIB
Forumember

Male Posts : 500
Reputation : 2
Language : English
Location : UK

http://ourbulgariaforum.freeforums.eu/

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by Ange Tuteur on July 17th 2014, 7:25 pm

Hello,

Why do I see JavaScript in your CSS stylesheet still ? This is making any selectors after invalid; they will not style elements properly. JavaScript code goes to Administration Panel > Modules > JavaScript Codes Management

The following selector to modify the vote button is invalid because of this error.
Code:
.vote {
  width: 16px; / *-- Width of the image chosen --* /
}
avatar
Ange Tuteur
Forumaster

Male Posts : 13085
Reputation : 2759
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by FIB on July 17th 2014, 9:54 pm

I don't know why its there? I have looked where you said and this is all I see


here is my ccs code, can you show me where it is and I will physically remove it. Sorry but I do not understand anything about java script

Code:
/Begin Cash mod
        $cash_update = $user_update = array();
        if ($config['cash_mod'] && $auth->acl_get('f_cash', $data['forum_id']))
        {    a.mainmenu {
    .vote {
        width: 16px; / *-- Width of the image chosen --* /
    }

    tr td div.vote {
        display: none !important;
    }

    div.vote-bar {
        display: none;
    }

    span#fa_share.fa_tbMainElement {
        display: none !important;
    }

    a.mainmenu {
      font-family:arial, sans-serif;
      font-size:14px !important;
    }

    vote {
    width: 24px;
    }

    div.vote-bar {
        display: none;
    }

        .LGlike {
          background: #105289;
          padding: 3px;
          border-radius: 4px;
          color: #fff;
          font-size: 10px;
          font-weight: bold;
          text-shadow: -1px 0.5px #888;
          box-shadow: 1px 1px 1px #888;
          cursor: pointer;
          margin-right: 4px;
        }
        .LGvote { margin: 0 5px; }
        .LGnovote {
          filter:Alpha(opacity=50);
          opacity: 0.5;
          cursor: default;
          box-shadow: none;
          text-shadow: none;
        }

tr td div.vote {
    display: none !important;
}

div.vote-bar {
    display: none;
}

tr td div.vote {
    display: none !important;
}

div.vote-bar {
    display: none;
}

   
    }    span#fa_share.fa_tbMainElement {
        display: none !important;
    }a.mainmenu {
  font-family:arial, sans-serif;
  font-size:14px !important;
}
            $cash_update = true;
            if ($config['cash_per_day'] != 0 && $user->data['user_cash'] >= $config['cash_per_day'])
            {
              if ($user->data['user_cash_date'] == date('d-m-Y'))
              {
                  $cash_update = false;
              }
              else
              {
                  $user_update = array(
                    'user_cash_date'  => "'" . date('d-m-Y') . "'",
                    'user_cash'        => $config['cash_amt'],
                  );
              }
            }
            else if ($config['cash_per_day'] != 0)
            {
              $user_update = array(
                  'user_cash_date'  => "'" . date('d-m-Y') . "'",
                  'user_cash'        => "user_cash + {$config['cash_amt']}",
              );
            }
           
            if ($cash_update)
            {
              $sql = 'UPDATE ' . CASH_AMT_TABLE . " SET cash_amt = cash_amt + {$config['cash_amt']} WHERE user_id = '{$user->data['user_id']}' AND cash_id = {$config['cash_id']}";
              $db->sql_query($sql);
              $number = $db->sql_affectedrows();
 
              if ($number < 1)
              {
                  $cash_ary = array(
                    'user_id' => $user->data['user_id'],
                    'cash_id' => $cashrow['cash_id'],
                    'cash_amt' => $cashrow['cash_post'],
                  );
                  $sql = 'INSERT INTO ' . CASH_AMT_TABLE . ' ' . $db->sql_build_array('INSERT', $cash_ary);
                  $db->sql_query($sql);
              }
            }
        }     
        //End Cash mod

        $sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . (($auth->acl_get('f_postcount', $data['forum_id'])) ? ', user_posts = user_posts + 1' : '') . (($cash_update) ? ", user_cash_date = {$user_update['user_cash_date']}, user_cash = {$user_update['user_cash']}" : '');
vote {
 width: 24px;
}
    div.vote-bar {
        display: none;
    } 

    .LGlike {
      background: #105289;
      padding: 3px;
      border-radius: 4px;
      color: #fff;
      font-size: 10px;
      font-weight: bold;
      text-shadow: -1px 0.5px #888;
      box-shadow: 1px 1px 1px #888;
      cursor: pointer;
      margin-right: 4px;
    }
    .LGvote { margin: 0 5px; }
    .LGnovote {
      filter:Alpha(opacity=50);
      opacity: 0.5;
      cursor: default;
      box-shadow: none;
      text-shadow: none;
    }





FIB
Forumember

Male Posts : 500
Reputation : 2
Language : English
Location : UK

http://ourbulgariaforum.freeforums.eu/

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by Luffy on July 17th 2014, 10:27 pm

Wow thats a bit of a mix up there..
Your CSS has all the Javascript codes in it..
What tutorials did u try to add into your forum?






avatar
Luffy
Manager
Manager

Male Posts : 4478
Reputation : 453
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by SLGray on July 17th 2014, 10:29 pm

That looks like JavaScript:

Code:
 $cash_update = $user_update = array();
  if ($config['cash_mod'] && $auth->acl_get('f_cash', $data['forum_id']))
Code:

$cash_update = true;
if ($config['cash_per_day'] != 0 && $user->data['user_cash'] >= $config['cash_per_day'])
{
  if ($user->data['user_cash_date'] == date('d-m-Y'))
  {
$cash_update = false;
  }
  else
  {
$user_update = array(
  'user_cash_date'  => "'" . date('d-m-Y') . "'",
  'user_cash'   => $config['cash_amt'],
);
  }
}
else if ($config['cash_per_day'] != 0)
{
  $user_update = array(
'user_cash_date'  => "'" . date('d-m-Y') . "'",
'user_cash'   => "user_cash + {$config['cash_amt']}",
  );
}

if ($cash_update)
{

    $sql = 'UPDATE ' . CASH_AMT_TABLE . " SET cash_amt =
cash_amt + {$config['cash_amt']} WHERE user_id =
'{$user->data['user_id']}' AND cash_id = {$config['cash_id']}";
  $db->sql_query($sql);
  $number = $db->sql_affectedrows();
 
  if ($number < 1)
  {
$cash_ary = array(
  'user_id' => $user->data['user_id'],
  'cash_id' => $cashrow['cash_id'],
  'cash_amt' => $cashrow['cash_post'],
);
$sql = 'INSERT INTO ' . CASH_AMT_TABLE . ' ' . $db->sql_build_array('INSERT', $cash_ary);
$db->sql_query($sql);
  }
}
  }
  //End Cash mod


    $sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time =
$current_time" . (($auth->acl_get('f_postcount', $data['forum_id'])) ?
 ', user_posts = user_posts + 1' : '') . (($cash_update) ? ",
user_cash_date = {$user_update['user_cash_date']}, user_cash =
{$user_update['user_cash']}" : '');


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 38255
Reputation : 2577
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by Luffy on July 17th 2014, 10:32 pm

Try adding the below as your CSS code:
Code:
.vote {
width: 16px; / *-- Width of the image chosen --* /
}
tr td div.vote {
display: none !important;
}
div.vote-bar {
display: none;
}
span#fa_share.fa_tbMainElement {
display: none !important;
}
 a.mainmenu {
font-family:arial, sans-serif;
font-size:14px !important;
}
div.vote-bar {
display: none;
}
.LGlike {
background: #105289;
padding: 3px;
border-radius: 4px;
color: #fff;
font-size: 10px;
font-weight: bold;
text-shadow: -1px 0.5px #888;
box-shadow: 1px 1px 1px #888;
cursor: pointer;
margin-right: 4px;
}
.LGvote { margin: 0 5px; }
.LGnovote {
filter:Alpha(opacity=50);
opacity: 0.5;
cursor: default;
box-shadow: none;
text-shadow: none;
}


Edit: You had the same codes 2 and 3 times. You only need to add it just once and it will work if the forum is where it should be. If you modified any templates and you try to add a code and it doesn't work, then ask for help, because most likely the modified templates changed the elements.
avatar
Luffy
Manager
Manager

Male Posts : 4478
Reputation : 453
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by FIB on July 17th 2014, 10:52 pm

I just added that code and now I have nothing at all showing ? So I will remove it for now.

FIB
Forumember

Male Posts : 500
Reputation : 2
Language : English
Location : UK

http://ourbulgariaforum.freeforums.eu/

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by Luffy on July 17th 2014, 10:53 pm

Wait. Lets take it from the beginning. What do you want to do?
You want to add the thumbs up and move it to the left?





avatar
Luffy
Manager
Manager

Male Posts : 4478
Reputation : 453
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by FIB on July 17th 2014, 10:59 pm

At this moment I already have the thumbs up showing, but all I need to do is move it to the left

This is what I have right now......


FIB
Forumember

Male Posts : 500
Reputation : 2
Language : English
Location : UK

http://ourbulgariaforum.freeforums.eu/

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by Luffy on July 17th 2014, 11:00 pm

Ok please accept me as a member so i can tell you exactly what to use.





avatar
Luffy
Manager
Manager

Male Posts : 4478
Reputation : 453
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by FIB on July 17th 2014, 11:03 pm

Ok

FIB
Forumember

Male Posts : 500
Reputation : 2
Language : English
Location : UK

http://ourbulgariaforum.freeforums.eu/

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by Luffy on July 17th 2014, 11:06 pm

Search in your CSS (Admin Panel >> Display >> Pics and Colors >> Colors >> CSS Stylesheet) if you have this: ".vote .vote-button"
If you do then replace it with this:
Code:
.vote .vote-button {
font-weight: 700;
margin-left: -15px;
text-align: center;
}
If you don't have it then simply add it to your CSS.





avatar
Luffy
Manager
Manager

Male Posts : 4478
Reputation : 453
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by FIB on July 17th 2014, 11:12 pm

Excellent it worked



Thank you very much

Σας ευχαριστώ πολύ Hope I got this translation right Smile

FIB
Forumember

Male Posts : 500
Reputation : 2
Language : English
Location : UK

http://ourbulgariaforum.freeforums.eu/

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by Luffy on July 17th 2014, 11:15 pm

Now the only thing you have to change is margin-left: -15px;
Only the number.


Edit: The Greek is fine! ;P (you used plural tho.. lol. its: Σε ευχαριστώ πολύ Razz )
avatar
Luffy
Manager
Manager

Male Posts : 4478
Reputation : 453
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by FIB on July 17th 2014, 11:17 pm

I will close it now


Last edited by FIB on July 17th 2014, 11:31 pm; edited 1 time in total

FIB
Forumember

Male Posts : 500
Reputation : 2
Language : English
Location : UK

http://ourbulgariaforum.freeforums.eu/

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by FIB on July 17th 2014, 11:18 pm

Sorry for this post


Last edited by FIB on July 17th 2014, 11:29 pm; edited 1 time in total

FIB
Forumember

Male Posts : 500
Reputation : 2
Language : English
Location : UK

http://ourbulgariaforum.freeforums.eu/

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by Luffy on July 17th 2014, 11:19 pm

Any time! You can mark it as solved now! So long!
:wouhou:
avatar
Luffy
Manager
Manager

Male Posts : 4478
Reputation : 453
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: I need to know how to adjust some code

Post by Ange Tuteur on July 18th 2014, 12:26 am

Topic archived
avatar
Ange Tuteur
Forumaster

Male Posts : 13085
Reputation : 2759
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum