Advertisement:

Author Topic: [Plugin]Lorem Items  (Read 32266 times)

Emmanuel

  • Hero Member
  • *****
  • Posts: 645
  • .: ♥ Quality Swiss Details ♥ :. .: Swiss Made :.
Re: [Plugin]Lorem Items
« Reply #30 on: April 25, 2016, 12:08:58 pm »
Hope next plugin version  will be hosted  into the  osclass market

in the meantime, can we fork you repo or setup one somewhere to share?

Web-Media

  • Sr. Member
  • ****
  • Posts: 451
  • Web
Re: [Plugin]Lorem Items
« Reply #31 on: May 03, 2016, 01:35:30 pm »
Sure . as long it stays free plugin you can do whatever you wish .

osCanyon

  • Hero Member
  • *****
  • Posts: 701
  • osCanyon, the class of Osclass
Re: [Plugin]Dummy Items
« Reply #32 on: June 01, 2016, 10:28:32 pm »
Nice Feature :)
saves work, Thank you!!

on install and 1st use, no country was shown in dropdown?, so I added a small country and tried again, now I see both countries and the choice of "Random"
I decided to add more images to choose from, they are all png and none larger than the sample images, I renamed them(my new images) with numbers  starting at 7.png, 8.png, and so on, uploaded them to lorem/images .
I tried again to add 10 more items(different category this time) and most came with no picture attached, is it set at the max of 6 images in the code?, or should have the random been selected from all of them in the image folder of lorem?

PS I think to be able to input your own text and upload more images(from admin) would be a nice idea :)
Osclass v3.6.1

the content of  images folder .
upload the pictures OR put your own  png images (1,2,3,4,5,6) small ones (optimized for web )  for faster uploads
« Last Edit: June 01, 2016, 10:46:33 pm by osCanyon »

osCanyon

  • Hero Member
  • *****
  • Posts: 701
  • osCanyon, the class of Osclass
Re: [Plugin]Lorem Items
« Reply #33 on: June 02, 2016, 02:49:54 am »
so I found the array and changed it to include up to 35 :)
Code: [Select]
if (is_numeric($img)) {
            $images = array(
                '1.png',
                '2.png',
                '3.png',
                '4.png',
                '5.png',
                '6.png',

Web-Media

  • Sr. Member
  • ****
  • Posts: 451
  • Web
Re: [Plugin]Lorem Items
« Reply #34 on: June 02, 2016, 05:50:13 pm »
Hy all  !
Solved :
  • Upload,delete images from admin  is solved 
  • custom text from admin .
  • custom description and title lenght
  • custom user (random  registered ,random default or admin specified ) 
I'll release  1.0.2 version next week .
 As for  the custom fields i'm thinking   for version 1.0.3 .
Custom Attributes and  osclass default custom fields  will be supported


fosg2000

  • Jr. Member
  • **
  • Posts: 82
Re: [Plugin]Lorem Items
« Reply #35 on: June 03, 2016, 06:25:20 pm »
nice, addition...

installed with no problems, but can't see any "new ad"  inserted, in the front side, !?

also i can tell that "are there" because the item count on categories show it

i can see it the the back-end, with no problems.

THEME: BOXER

http://www.toyenmala.com/

osCanyon

  • Hero Member
  • *****
  • Posts: 701
  • osCanyon, the class of Osclass
Re: [Plugin]Lorem Items
« Reply #36 on: June 05, 2016, 02:53:02 am »
Thank You So much Web-Media
shall I just keep an eye on github? :o
this is the "cats meow" lol as they say  8)

Hy all  !
Solved :
  • Upload,delete images from admin  is solved 
  • custom text from admin .
  • custom description and title lenght
  • custom user (random  registered ,random default or admin specified ) 
I'll release  1.0.2 version next week .
 As for  the custom fields i'm thinking   for version 1.0.3 .
Custom Attributes and  osclass default custom fields  will be supported

osCanyon

  • Hero Member
  • *****
  • Posts: 701
  • osCanyon, the class of Osclass
Re: [Plugin]Lorem Items
« Reply #37 on: June 07, 2016, 02:56:36 pm »
@Web-Media
I sent you an email to your yahoo address but not sure you still use that one.
this plugin saves a lot of time and I have an idea I wanted to discuss with you..in private  ;D

fosg2000

  • Jr. Member
  • **
  • Posts: 82
Re: [Plugin]Lorem Items
« Reply #38 on: June 11, 2016, 05:09:19 pm »
Works !

the only issue now is when click the drop down menu for "country" is empty

thanks

Abhi

  • Jr. Member
  • **
  • Posts: 77
  • Love what you do :)
Re: [Plugin]Lorem Items
« Reply #39 on: June 14, 2016, 12:02:34 am »
Works !

the only issue now is when click the drop down menu for "country" is empty

thanks
hi i checked code
in items.php
for case 0 and default  case works fine

for case 1 i modified to this

 case 1:
       
        $option_country .= "<option  value=" .$countries[0]['pk_c_code'].">" . $countries[0]['s_name'] . "</option>";
        break;

and its working when there is only single country
« Last Edit: June 14, 2016, 12:04:14 am by Abhi143u11 »

fosg2000

  • Jr. Member
  • **
  • Posts: 82
Re: [Plugin]Lorem Items
« Reply #40 on: June 14, 2016, 01:46:42 am »
thanks for reply, but is not working for me


here is my actual line 49 to line 74

<?php
    $option_country = '';
   $option_country .= "<option  value=\"\">" . 'Select country' . "</option>";
    $countries = osc_get_countries();
   
    switch (count($countries)) {
    case 0:
        $country_message = '<pre>You have no country installed.Install at least 1 country or insert Lorem items with no location (Country,Region,City).</pre> ';
        break;
    case 1:
        $option_country .= "<option  value=" .$countries['pk_c_code'].">" . $countries['s_name'] . "</option>";
        break;
    default:
        foreach ($countries as $country) {
    $option_country .=  "<option value=".$country['pk_c_code'].">".$country['s_name']."</option>";
   }
 $option_country .= "<option  value=\"1\">" . 'Use Random Country' . "</option>";
        break;
    }

if(isset($country_message)){
    echo $country_message;
}else{

echo "<select name =\"loremCountry\">$option_country</select>\n";
}
?>

Emmanuel

  • Hero Member
  • *****
  • Posts: 645
  • .: ♥ Quality Swiss Details ♥ :. .: Swiss Made :.
Re: [Plugin]Lorem Items WITH SAMPLE FLAG
« Reply #41 on: June 14, 2016, 06:55:17 am »
Hi All,

New idea just pop'ing now is :

  • Ad a FLAG into the Ads Table in order to tag/flag ads as SAMPLE
  • In oc-admin, somewhere have a toggle to display or not the SAMPLE ads on the front website

Anybody has already seen either such a plugin or this 'hack' somewhere around?

imho, with not-so-lorem ads, would please Google and help to boot up new website
(not-so-lorem meaning "real" fake ads if i may say  ;) )

Any idea or comment please

Best regards
Eman

Abhi

  • Jr. Member
  • **
  • Posts: 77
  • Love what you do :)
Re: [Plugin]Lorem Items
« Reply #42 on: June 14, 2016, 09:10:23 am »
thanks for reply, but is not working for me


here is my actual line 49 to line 74

<?php
    $option_country = '';
   $option_country .= "<option  value=\"\">" . 'Select country' . "</option>";
    $countries = osc_get_countries();
   
    switch (count($countries)) {
    case 0:
        $country_message = '<pre>You have no country installed.Install at least 1 country or insert Lorem items with no location (Country,Region,City).</pre> ';
        break;
    case 1:
        $option_country .= "<option  value=" .$countries['pk_c_code'].">" . $countries['s_name'] . "</option>";
        break;
    default:
        foreach ($countries as $country) {
    $option_country .=  "<option value=".$country['pk_c_code'].">".$country['s_name']."</option>";
   }
 $option_country .= "<option  value=\"1\">" . 'Use Random Country' . "</option>";
        break;
    }

if(isset($country_message)){
    echo $country_message;
}else{

echo "<select name =\"loremCountry\">$option_country</select>\n";
}
?>

Check the screenshots i copied your code and run it check withzero image

Web-Media

  • Sr. Member
  • ****
  • Posts: 451
  • Web
Re: [Plugin]Lorem Items
« Reply #43 on: June 14, 2016, 10:10:29 am »
Hy Abbi143u11 .
What country do you have installed ?
Osc_get_countries is a osclass function that should return countries .

Abhi

  • Jr. Member
  • **
  • Posts: 77
  • Love what you do :)
Re: [Plugin]Lorem Items
« Reply #44 on: June 14, 2016, 11:36:57 am »
i had installed one country India

the code was not working for one country so in case1 i added 0

and when there are multiple countries the default case works fine