Advertisement:

Author Topic: [Solved] last command  (Read 1642 times)

amir.01

  • Newbie
  • *
  • Posts: 12
[Solved] last command
« on: September 17, 2014, 12:12:30 am »
whant see last command in sidbar
and and whant see last post in my choos category in sidbar
« Last Edit: September 17, 2014, 10:05:18 pm by amir.01 »

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: last command
« Reply #1 on: September 17, 2014, 12:48:44 am »
@amir.01
What?

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: last command
« Reply #2 on: September 17, 2014, 02:13:12 am »
yea, what? baffled google translator  :-X

amir.01

  • Newbie
  • *
  • Posts: 12
Re: last command
« Reply #3 on: September 17, 2014, 11:34:48 am »
Maybe You need more explanation
If you've worked with WordPress
You can see the latest comments on the site or you can see the last post in a particular category

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: last command
« Reply #4 on: September 17, 2014, 12:22:16 pm »
@amir.01
You can call latest added listing using:
Code: [Select]
<?php 
  
while(osc_has_latest_items()) {
    
//...some code
  
}
?>


amir.01

  • Newbie
  • *
  • Posts: 12
Re: last command
« Reply #5 on: September 17, 2014, 12:35:45 pm »
@amir.01
You can call latest added listing using:
Code: [Select]
<?php 
  
while(osc_has_latest_items()) {
    
//...some code
  
}
?>


but won't call only one category  :(


frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: last command
« Reply #6 on: September 17, 2014, 12:56:11 pm »
@amir.01
In this case, follow:
http://doc.osclass.org/Display_only_certain_type_of_listings

There is function:
Code: [Select]
osc_query_item("keyword=value1,value2,value3,...");
This allows you to get listings just from particular category ;)

amir.01

  • Newbie
  • *
  • Posts: 12
Re: last command
« Reply #7 on: September 17, 2014, 01:12:54 pm »
tnx  :-* :-* :-* :-* :-*


dont find latest command ?
« Last Edit: September 17, 2014, 01:15:36 pm by amir.01 »

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: last command
« Reply #8 on: September 17, 2014, 01:24:29 pm »
@amir.01
Welcome, if your problem is solved, please add [Solved] to title of your first post in this thread ;)

amir.01

  • Newbie
  • *
  • Posts: 12
Re: last command
« Reply #9 on: September 17, 2014, 01:48:50 pm »
Only one part of the problem is solved
I need latest comments  :-[
« Last Edit: September 17, 2014, 02:01:46 pm by amir.01 »

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: last command
« Reply #10 on: September 17, 2014, 05:43:35 pm »
@amir.01
This is not in your original question, so your problem was solved :D
... function to get latest comments, or latest comments by category does not exist and you need to create one. (you could use osc_query_items() as example, but it is complicated).