Stefce 146 Posting Pro

Hello there :), i have bunch of pictures which the title is like this Name-LastName-year-category-.... what i want to do is sort them all in folders which will have only their Name-LastName and all pics with that name go in that folder. Is there some tool for this job to be done easily? Or maybe some code that i can setup?

I hope you understood me. if not feel free to say ill try to explain better, thank you :)

Stefce 146 Posting Pro

@Dani

Exactly! You can make two sections in the inbox popup, Inbox & Notifications and putting a nice audio will be huge plus.

EDIT: Even more cool will be to not get redirected to other page to see the netifications list, all from the page you are currently on to be possible to go to your/watched thread.

Stefce 146 Posting Pro

Since am member of this forum am asking my self one question, why am not informed on time when someone reply to my question?

For me the biggest engagement is something which is "LIVE" and i think for all of us is. I think this should be considered as "No. 1 to do list" for this forum.

EDIT: What am saying is, emails are good to inform you when you are off your PC or off site, but live notifications on the website it self are priceless.

  • Thank you and bye
Stefce 146 Posting Pro

Hello, so i tried to make my own insta crawler but having some dificulties, here is the code for now:

import requests
    from bs4 import BeautifulSoup

    def insta_spider(max_pages):
        page = 1
        while page <= max_pages:
            url = 'https://instagram.com/xenia/'
            source_code = requests.get(url)
            plain_text = source_code.text
            soup = BeautifulSoup(plain_text, "html.parser")
            for link in soup.findAll('a', {'class': '_2g7d5 notranslate _7qk7w'}):
                href = "https://instagram.com/" + link.get('href')
                title = link.string
                print(href)
                print(title)
                #get_single_item_data(title)
            page += 1

    insta_spider(1)

so basicly i want to get the href tags with the class name _2g7d5 notranslate _7qk7w of the current instagram profile which is https://instagram.com/xenia/ but i get nothing gathered Process finished with exit code 0. Someone knows whats the problem with this code or instagram does not allow to crawl?

EDIT: Somehow instagram doesnt display the classes i want to gather in the View Source page how do i solve this?

Stefce 146 Posting Pro

Yea sorry, you are right i have posted in wrong forum... when i run it i get a windows popup and closes imediately, i tried to catch what it says, here is it:

https://imgur.com/a/GfbQq

I have changed the auth.json.example file with my username and pass from instagram but again same thing happens.

For the customization i will try my best to make it for my needs but first i need to make it run and am newbie in python

Stefce 146 Posting Pro

i found this too but dont know how to run it

Stefce 146 Posting Pro

Hello all, is there some python code or program to crawl instagram? I would like to get the user Username, Bio and 5-6 random pics.

  • Thank you
Stefce 146 Posting Pro

I dont have answer, but thumbs UP for Dick hahahaha :D

rproffitt commented: Now google diafol. +0
Stefce 146 Posting Pro

Thank you @diafol i will have fun tonight :P

Stefce 146 Posting Pro

Problem is solved with this solution but i was searching the easier way.

  • Thank you
rproffitt commented: What, no Futurama quote? "Whatever you did, professor, I'm sure there's a reasonable explanation." +12
Stefce 146 Posting Pro

Yea i forgot that @rproffitt

HP 250 G5
Serial: CND6504630
Product: W4M66EA#ABB

Stefce 146 Posting Pro

I have a serious problem with my new laptop i have installed clean copy of windows 7 on in and it runs okay but now i cannot connect it to the internet without drivers i tried so many things but no help please if you have any method how i can connect to the internet and install the drivers somehow. I have tried the following:

  • With internet cable pluged into the laptop (drivers requered)
  • USB Stick (Windows cant read the USB, drivers required)
  • Reinstalled the windows 3 times (Doesn't helped)
  • Tried with my phone to connect to the internet (drivers cannot be found)
  • Troubleshoot (Windows could not find a driver for your network adapter, Search Online?)

Please help, how then i can install that drivers when i cannot connect anything on the laptop?

Stefce 146 Posting Pro

Heres the full code

<form action="" method="post">
<?php
$sql = "SELECT ID, votemodelName, votemodelImage, modelLink, votes, ip_address FROM vote ORDER BY ID LIMIT 3";
$result = $conn->query($sql);

$user_ip = getenv('REMOTE_ADDR');
$geo = unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=$user_ip"));

if (!$result) {
    trigger_error('Wrong SQL: ' . $sql . ' Error: ' . $conn->error, E_USER_ERROR);
} else if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
        $ID = $row["ID"];
        $votemodelName = $row["votemodelName"];
        $votemodelImage = $row["votemodelImage"];
        $modelLink = $row["modelLink"];
        $votes = $row["votes"];
        $ip_address = $row["ip_address"];
    ?>
<div class="col-xs-4 col-md-4">
<a href="<?= $modelLink ?>" target="_blank" class="thumbnail">
<img src="<?= $votemodelImage ?>" class="thumb-vote-image" alt="Amanda">
</a>
<h1><button type="submit" name="vote_<?= $ID ?>" class="btn btn-info btn-lg">VOTE</button></h1>
<h3><?= $votemodelName ?></h3>
</div>
    <?php
    if(isset($_POST["vote_".$ID])) {
        $voteModel = $_POST["vote_".$ID];
        $sql = "UPDATE vote SET votes = votes + 1 WHERE ID='".$voteModel."'";
        $result = $conn->query($sql);
    }
}
}
?>
</form>
Stefce 146 Posting Pro

i get an error now
array(1) { ["vote_3"]=> string(0) "" } Fatal error: Uncaught Error: Call to a member function fetch_assoc() on boolean in C:\xampp\htdocs\example\includes\featured.php:12 Stack trace: #0 C:\xampp\htdocs\example\index.php(31): include() #1 {main} thrown in C:\xampp\htdocs\example\includes\featured.php on line 12

Stefce 146 Posting Pro

line 31 in the code here when i replace it with the @Norman_4 example

Stefce 146 Posting Pro

I think not it gives me error when i click on the last button for vote vote_3
Notice: Undefined offset: 3 in C:\xampp\htdocs\example\includes\featured.php on line 43

Stefce 146 Posting Pro

Sorry i have forgoten here is the code but its mysqli

$DBServer = 'localhost';
$DBUser   = 'root';
$DBPass   = '';
$DBName   = 'voting';

$conn = mysqli_connect($DBServer, $DBUser, $DBPass, $DBName);
if ($conn->connect_error) {
    die('Connect Error (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error);
}
Stefce 146 Posting Pro
$conn = mysqli_connect($DBServer, $DBUser, $DBPass, $DBName);
if ($conn->connect_error) {
    die('Connect Error (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error);
}

Sorry i have forgoten

Stefce 146 Posting Pro

I have problem updating the mySQL table i have simple loop to display the rows in the table in HTML FORM but when i try to update the row notting happens, no row is updated!
here is the code

<form action="" method="post">
<?php
$sql = "SELECT ID, votemodelName, votemodelImage, modelLink, votes, ip_address FROM vote ORDER BY ID LIMIT 3";
$result = $conn->query($sql);

$user_ip = getenv('REMOTE_ADDR');
$geo = unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=$user_ip"));

if (!$result) {
    trigger_error('Wrong SQL: ' . $sql . ' Error: ' . $conn->error, E_USER_ERROR);
} else if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
        $ID = $row["ID"];
        $votemodelName = $row["votemodelName"];
        $votemodelImage = $row["votemodelImage"];
        $modelLink = $row["modelLink"];
        $votes = $row["votes"];
        $ip_address = $row["ip_address"];
    ?>
<div class="col-xs-4 col-md-4">
    <a href="<?= $modelLink ?>" target="_blank" class="thumbnail">
        <img src="<?= $votemodelImage ?>" class="thumb-vote-image" alt="Amanda">
    </a>
    <h1><button type="submit" name="vote_<?= $ID ?>" class="btn btn-info btn-lg">VOTE</button></h1>
    <h3><?= $votemodelName ?></h3>
</div>

<?php
}
if(isset($_POST["vote_".$ID])) {
    $voteModel = $_POST["vote_".$ID];

    $sql = "UPDATE vote SET votes = votes + 1 WHERE ID='".$voteModel."'";
    $result = $conn->query($sql);

}
}
?>
</form>
Stefce 146 Posting Pro

Definitely python the options are endless, machine learning is the future so best choice will be python!

Stefce 146 Posting Pro
  • Nope i dont have options for sorting the videos but maybe in future i will for now its just a simple slider with two buttons and video.
  • Mostly are youtube videos, but i also have facebook videos and vimeo.
  • Am using the whole embed markup..

Am a little confuzed on how to change the page, am thinking to make it with $_GET but thats not what i want, i want more advanced method. Thank you @diafol

Stefce 146 Posting Pro

How do i select the next row in php from mysql table, i have 4 columns ID, video_title, video_desc, video_embed so i have more than 10000 rows in the table with youtube embed videos and i want to scroll though them with next and previous buttons but thats not the limit i will add more in the future. Am little confuzed on how do i change the videos from page to page with new URL's here is an example what i have right now.

index.php

<?php

        $sql = "SELECT ID, video_title, video_desc, video_embed FROM videos";
        $result = $conn->query($sql);

        if (!$result) {
            trigger_error('Wrong SQL: ' . $sql . ' Error: ' . $conn->error, E_USER_ERROR);
        } elseif ($result->num_rows > 0) {
            while ($row = $result->fetch_assoc()) {
                $ID = $row["ID"];
                $title = $row["video_title"];
                $desc = $row["video_desc"];
                $embed = $row["video_embed"];
            }
        }
    ?>
<body>
<div class="row">
<div class="col-sm-8 col-md-offset-2 text-center video">
    <h2><?= $title ?></h2>
    <a href="#"><span class="glyphicon glyphicon-menu-left" aria-hidden="true">PREVIOUS VIDEO</span></a>

    <div class="embed-responsive embed-responsive-16by9">
        <?= $embed ?>
    </div>

    <a href="#"><span class="glyphicon glyphicon-menu-right" aria-hidden="true">NEXT VIDEO</span></a>
    <h3><?= $desc ?></h3>

</div>
</div>
</body>

BTW The URL should be the $title of the video
So for example like this
www.example.com/Mercedes-Benz
you click NEXT VIDEO button, opens new page with new url
www.example.com/BMW-M4

Stefce 146 Posting Pro

Still same problem, i think the class col-md-offset-2 have something with this problem but am not sure? BTW i must ask, is it easier to do this without bootstrap, just with clean CSS? If yes lets do it that way.

EDIT I really want this to be done in clean bootstrap if is possible but also in CSS too, just for learning purposes.

EDIT 2 The problem is fixed with the last UPDATED CSS, i really dont know my localhost is so slow with updating the code

Stefce 146 Posting Pro

If you are updating numbers in your table why you have put the variables in quotes?

$update = "update invoice set reg_no = '$reg_no', cost = '$cost' where i_id = '$update_i_id'";

Stefce 146 Posting Pro

hahaha i wrote that just for fun :D but i wont lie, its for spamming goals and learnign purposes.. i just wanna test it out how it will handle the work

EDIT I saw that post on some forum so i though i will write it here too i laughted so much :D

Reverend Jim commented: Yeah. Despicable. +0
Stefce 146 Posting Pro

Nope, still on old version

Stefce 146 Posting Pro

To spam the sh*t out of blogs/social networks with CPA offers because i need some bucks to buy internet stuff..

Reverend Jim commented: That's actually pretty despicable. -3
Stefce 146 Posting Pro

Almost DONE... This code is good with little numbers chaning but it has one more problem at certain windows size the video goes at the very left side and as you slowly decrease the size of the window it goes back to normal try to focus on resizing and you will see what is happening

Stefce 146 Posting Pro

Did you tried to turn it off and back on?

Stefce 146 Posting Pro

I putted the classes back now and again comes the problem with the arrows they doesnt appear at certain windows size. Here is the full code:

HTML
https://pastebin.com/ysv5Z35p

CSS
https://pastebin.com/zRxgyTLc

Stefce 146 Posting Pro

When i remove the col-sm-8 col-md-offset-2 classes the video hoes full width but thats acually too large for watching and page functinality please help ..

Stefce 146 Posting Pro

This solves the problem but another comes up.. The video at the full size windows is now too small.. here is the full code of the page

<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>title</title>

    <!-- Bootstrap Core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <style>
    .video {
        position: relative;
        width: 80%;
        margin: 0 auto;
    }

    .video .glyphicon {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }

    .video .glyphicon-menu-left { left: -36px }
    .video .glyphicon-menu-right { right: -36px }

    @media (min-width: 768px) {

        .video {
            width: auto;
            margin: auto;
        }

    }
    </style>

</head>

<body>
    <!-- Page Content -->
    <div class="container">
        <div class="row">
            <div class="col-lg-12 text-center">
                <h1>ADVERTISEMENT</h1>
            </div>
        </div>
        <hr>
        <div class="row">
            <h2>Some very nice Title!</h2>
            <div class="col-sm-8 col-md-offset-2 text-center video">

                <h1><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span></h1>

                <div class="embed-responsive embed-responsive-16by9">
                     <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/zpOULjyy-n8"></iframe>
                </div>

                <h1><span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span></h1>
                <h3>Some very nice description about the video...</h3>

            </div>
        </div>
    </div>
    <!-- /.row -->
    <!-- jQuery Version 1.11.1 -->
    <script src="js/jquery.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="js/bootstrap.min.js"></script>

</body>

</html>

EDIT More friendly code look: https://pastebin.com/zHV9NgZr

Stefce 146 Posting Pro

@JamesCherrill & @rproffitt - may i ask why you are using Opera Browser? And not Chrome or Mozzilla

Stefce 146 Posting Pro

nope i dont have any code, am searching for one or fully working program for that requirement...

Stefce 146 Posting Pro

Yup the arrows are not visible when i resize to phone size the window. I need to move the srcollbar instead to see right arrow.. but left arrow is completly out of vision

here is picture to see
http://imgur.com/a/zA0Ch

http://imgur.com/a/aGqtl

Stefce 146 Posting Pro

Hello everyone, is there someone who knows some free tool or some python code that i can run to comment automaticly on open blogs where it doesnt require registered account to comment also to crawl the links on that blog and switch to another one and so on... ?

Stefce 146 Posting Pro

why i need to enter minus values to show the arrows left and right

.video { position: relative }

.video .glyphicon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.video .glyphicon-menu-left { left: -36px }
.video .glyphicon-menu-right { right: -36px }

EDIT Also when i resize the window the arrows are not visible

Stefce 146 Posting Pro

Other members PM me that they can not reply to this thread... Whats the problem?

Stefce 146 Posting Pro

I have a problem with bootstrap design i want to make a very simple page which will contain two buttons and a video. The prob. is i dont know how to align theese two buttons with the video in one row here is the code i have:

<body>
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-md-offset-2 text-center">

                <span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span>

                <div class="embed-responsive embed-responsive-16by9">
                     <iframe class="embed-responsive-item" src="..."></iframe>
                </div>

                <span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span>

            </div>
        </div>
    </div>
</body>

here is an example how i want to look CLICK HERE

EDIT At the moment the arrows are up and below the video

Thank you very much

Stefce 146 Posting Pro

@rubberman yes that would be usefull but i do not want to spy on people.

Stefce 146 Posting Pro

@ByakkoChan theese are way too much expensive also i need arount 1000 - 1500 usb sticks about 200MB size.

Stefce 146 Posting Pro

Are you using Wordpress or you are developing the site from zero?
If you use WP as builder its seo optimized and have bunch of plugins for you to download and give on page seo and much more options one of the best is Yoast SEO. If you are building from zero(0) focus on meta tags, alt tags, URL, Social Networks tags, eye taking shares buttons

Stefce 146 Posting Pro

Oh god it worked :D i have forgoten to put type="button" in the <button> section :D
Thank you very much :)

Stefce 146 Posting Pro

Hi everyone. I want to make when i press a button to showup a dialog but page to not refresh or if refreshes to showup after that. i have this code but the dialog is going away after clicking the button

<form action="" method="post">
    <div class="col-xs-4 col-md-4">
    <a href="<?= $Link ?>" target="_blank" class="thumbnail">
        <img src="<?= $Image ?>" class="thumb-vote-image" alt="Item">
    </a>
    <h1><button name="<?= $ID ?>" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">VOTE</button></h1>
    <h3><?= $Name ?></h3>
    </div>
</form>

<?php
    if(isset($_POST[$ID])) {
        $vote = $ID;
?>
<!-- Modal -->
<div class="modal fade" id="myModal" role="dialog">
    <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal">&times;</button>
            <h4 class="modal-title"></h4>
        </div>
        <div class="modal-body">
            <center>
                <p>Item 1</p>
                <p>Item 2</p>
                <p>Item 3</p>
            </center>
        </div>
    </div>
</div>
</div>
<?php
}
Stefce 146 Posting Pro

I think will be more awesome to make a featured product on the top of the page with big and quality pictures. You will gain more trust and comfortability of the users. Right now its something like BLOG website for news articles. Thats my opinion.

Stefce 146 Posting Pro

Hello how can i lock a usb drive that the user it will be not able to remove the files that are in also to cant add new ones? I think its very cool for advertising own goals :)

  • Thanks :)
Stefce 146 Posting Pro

bump.

Stefce 146 Posting Pro

Right now the attachment page contain the gallery clicked/choosen image but in a small resolution i think its thumbnail size by default, so you must click on it and it will redirect you to the actual file URL so you will be able to see it in full resolution. I want to make when you click the gallery image the same image to be shown in attachment page but in larger resolution so to be 100% width and height and also if possible to dont redirect you to the actual file URL when you click it again. Here is the full code of the attachments.php page in wordpress.

<?php

/**
 * Get the attachment src, but also have the option of getting the fallback URL.
 *
 * @param $attachment
 * @param $size
 * @param bool|false $fallback
 *
 * @return array|bool|false
 */
function siteorigin_widgets_get_attachment_image_src( $attachment, $size, $fallback = false ){
    if( empty( $attachment ) && !empty($fallback) ) {
        $url = parse_url( $fallback );

        if( !empty($url['fragment']) && preg_match('/^([0-9]+)x([0-9]+)$/', $url['fragment'], $matches) ) {
            $width = intval($matches[1]);
            $height = intval($matches[2]);
        } else {
            $width = 0;
            $height = 0;
        }

        // TODO, try get better values than 0 for width and height
        return array( $fallback, $width, $height, false );
    }
    if(!empty($attachment)) {
            return wp_get_attachment_image_src( $attachment, $size );
    }

    return false;
}

function siteorigin_widgets_get_attachment_image( $attachment, $size, $fallback ){
    if( !empty( $attachment ) ) {
        return wp_get_attachment_image( $attachment, $size );
    } else {
        $src = siteorigin_widgets_get_attachment_image_src( $attachment, $size, $fallback );
        if( empty($src[0]) ) return '';

        $atts …
Stefce 146 Posting Pro

Am displaying the images in WordPress Gallery and i cannot see option to change the CSS of the image.

Stefce 146 Posting Pro

Is there a way i can edit the attachment page on wordpress theme i want my picture to be in full size and add some banners at the top am using Bussinesx Front Page Theme