UOC Forums: Help ar jūsu skriptu! - UOC Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Help ar jūsu skriptu! ipb.uoc.lv

#1 User is offline   fans Icon

  • Lasu noteikumus
  • Icon
  • Group: Lietotājs
  • Posts: 5
  • Joined: 26-November 09

Post icon  Posted 26 November 2009 - 03:40 PM

Čaw! Tātad gribēju lietot jūsu veidotos skriptus no ipb.uoc.lv, bet kad ieleiku tos savā webā izmet kkadu eroru sad.gif

CODE
Parse error: syntax error, unexpected T_DNUMBER in /usr/epit/www/beta/user.php on line 3


Būtu labi ja kāds varētu help smile.gif
0

#2 User is offline   6matko Icon

  • Made By 6matko
  • Icon
  • Group: Lietotājs
  • Posts: 709
  • Joined: 07-November 09
  • Gender:Male
  • Location:Jelgava
  • Interests:CS / PHP / MySQL / MU / PhotoShop / Girls / Porn / ... cant remember all of that :D

Posted 26 November 2009 - 03:54 PM

kaada ir 3 rinda user.php ?
0

#3 User is offline   fans Icon

  • Lasu noteikumus
  • Icon
  • Group: Lietotājs
  • Posts: 5
  • Joined: 26-November 09

Posted 26 November 2009 - 03:59 PM

Tukša biggrin.gif
CODE
<?php
02.//Vajadzīga palīdzība, greizies "http://uoc.lv/" forumā sadaļā "Problēmas un Risinājumi"
03.
04.//Iestatījumi
05.include_once('forum/conf_global.php'); //Ceļš uz foruma konfigurācijas failu.
06.define('WWW','http://uoc.lv/'); //Mājaslapas tiešā adrese.
07.define('COUNT',10); //Cik jaunumi tiks izvadīti.
08.define('FORUM',2); //Foruma id no kura tiks izvadīti jaunumus.
09.
10.$news = '';
11.
12.$link = mysql_connect($INFO['sql_host'],$INFO['sql_user'],$INFO['sql_pass']);
13.mysql_query('use '.$INFO['sql_database'].';');
14.
15.$result = mysql_query('select t1.tid,t1.title,t1.start_date,t1.starter_name,t1.posts,t2.post from '.$INFO['sql_tbl_prefix'].'topics t1 join '.$INFO['sql_tbl_prefix'].'posts t2 on (t1.tid = t2.topic_id) where t1.forum_id = '.FORUM.' group by t1.tid order by t1.start_date desc limit '.COUNT.';');
16.if (!empty($result)) {
17.while ($r = mysql_fetch_array($result)) {
18.//Izvades bloks
19.$news .='<a href="'.WWW.'forum/index.php?showtopic='.$r[0].'">'.$r[1].'</a><br/>'; //Jaunuma nosaukums un links uz forumu.
20.$news .=$r[5].'<br/>'; //Jaunuma teksts.
21.$news .=$r[3].' '.date('Y.m.d.', $r[2]).' Komentāri('.$r[4].')<br/>'; //Autors un ievietošanas datums.
22.$news .='<hr/>'; //Atdalam ziņas ar horizontālu līniju.
23.}
24.} else {
25.$news = 'Ziņu ieraksti nav atrasti'; //Forumā nav ziņu ierakstu, vai ir notikusi kļūme!
26.}
27.
28.echo $news;
29.mysql_close($link);
30.?>



This post has been edited by fans: 26 November 2009 - 04:02 PM

0

#4 User is offline   6matko Icon

  • Made By 6matko
  • Icon
  • Group: Lietotājs
  • Posts: 709
  • Joined: 07-November 09
  • Gender:Male
  • Location:Jelgava
  • Interests:CS / PHP / MySQL / MU / PhotoShop / Girls / Porn / ... cant remember all of that :D

Posted 26 November 2009 - 04:13 PM

iedo visu kodu pilniibaa un forum/conf_global.php kodu
0

#5 User is offline   fans Icon

  • Lasu noteikumus
  • Icon
  • Group: Lietotājs
  • Posts: 5
  • Joined: 26-November 09

Posted 26 November 2009 - 04:17 PM

config
CODE
<?php
$INFO['sql_driver']            =    'mysql';
$INFO['sql_host']            =    'localhost';
$INFO['sql_database']            =    'SLĒPTS';
$INFO['sql_user']            =    'SLĒPTS';
$INFO['sql_pass']            =    'SLĒPTS';
$INFO['sql_tbl_prefix']            =    '';
$INFO['sql_debug']            =    '1';
$INFO['sql_charset']            =    '';
$INFO['board_start']            =    '1255709706';
$INFO['installed']            =    '1';
$INFO['php_ext']            =    'php';
$INFO['safe_mode']            =    '0';
$INFO['board_url']            =    'http://epit.lv/forum';
$INFO['banned_group']            =    '5';
$INFO['admin_group']            =    '4';
$INFO['guest_group']            =    '2';
$INFO['member_group']            =    '3';
$INFO['auth_group']            =    '1';
$INFO['use_friendly_urls']            =    '1';
$INFO['_jsDebug']            =    '0';
$INFO['mysql_tbl_type']            =    'MyISAM';

define('IN_DEV', 0);

?>




Tas ir pilnais kods, bet tikai man ir nomainīts Mājas tiešā adrese uz manu!
CODE
<?php
02.//Vajadzīga palīdzība, greizies "http://uoc.lv/" forumā sadaļā "Problēmas un Risinājumi"
03.
04.//Iestatījumi
05.include_once('forum/conf_global.php'); //Ceļš uz foruma konfigurācijas failu.
06.define('WWW','http://uoc.lv/'); //Mājaslapas tiešā adrese.
07.define('COUNT',10); //Cik jaunumi tiks izvadīti.
08.define('FORUM',2); //Foruma id no kura tiks izvadīti jaunumus.
09.
10.$news = '';
11.
12.$link = mysql_connect($INFO['sql_host'],$INFO['sql_user'],$INFO['sql_pass']);
13.mysql_query('use '.$INFO['sql_database'].';');
14.
15.$result = mysql_query('select t1.tid,t1.title,t1.start_date,t1.starter_name,t1.posts,t2.post from '.$INFO['sql_tbl_prefix'].'topics t1 join '.$INFO['sql_tbl_prefix'].'posts t2 on (t1.tid = t2.topic_id) where t1.forum_id = '.FORUM.' group by t1.tid order by t1.start_date desc limit '.COUNT.';');
16.if (!empty($result)) {
17.while ($r = mysql_fetch_array($result)) {
18.//Izvades bloks
19.$news .='<a href="'.WWW.'forum/index.php?showtopic='.$r[0].'">'.$r[1].'</a><br/>'; //Jaunuma nosaukums un links uz forumu.
20.$news .=$r[5].'<br/>'; //Jaunuma teksts.
21.$news .=$r[3].' '.date('Y.m.d.', $r[2]).' Komentāri('.$r[4].')<br/>'; //Autors un ievietošanas datums.
22.$news .='<hr/>'; //Atdalam ziņas ar horizontālu līniju.
23.}
24.} else {
25.$news = 'Ziņu ieraksti nav atrasti'; //Forumā nav ziņu ierakstu, vai ir notikusi kļūme!
26.}
27.
28.echo $news;
29.mysql_close($link);
30.?>

0

#6 User is offline   6matko Icon

  • Made By 6matko
  • Icon
  • Group: Lietotājs
  • Posts: 709
  • Joined: 07-November 09
  • Gender:Male
  • Location:Jelgava
  • Interests:CS / PHP / MySQL / MU / PhotoShop / Girls / Porn / ... cant remember all of that :D

Posted 26 November 2009 - 04:20 PM

02,03 u.t.t. arii ir ? oO
0

#7 User is offline   fans Icon

  • Lasu noteikumus
  • Icon
  • Group: Lietotājs
  • Posts: 5
  • Joined: 26-November 09

Posted 26 November 2009 - 04:22 PM

QUOTE (6matko @ Nov 26 2009, 04:20 PM) <{POST_SNAPBACK}>
02,03 u.t.t. arii ir ? oO



kas 02,03 ?
0

#8 User is offline   6matko Icon

  • Made By 6matko
  • Icon
  • Group: Lietotājs
  • Posts: 709
  • Joined: 07-November 09
  • Gender:Male
  • Location:Jelgava
  • Interests:CS / PHP / MySQL / MU / PhotoShop / Girls / Porn / ... cant remember all of that :D

Posted 26 November 2009 - 04:24 PM

kr4 kodam jaizskataas vispaar taa:
CODE
<?php

include_once('forum/conf_global.php');
define('WWW','http://uoc.lv/');
define('COUNT',10);
define('FORUM',2);

$news = '';

$link = mysql_connect($INFO['sql_host'],$INFO['sql_user'],$INFO['sql_pass']);
mysql_query('use '.$INFO['sql_database'].';');

$result = mysql_query('select t1.tid,t1.title,t1.start_date,t1.starter_name,t1.posts,t2.post from '.$INFO['sql_tbl_prefix'].'topics t1 join '.$INFO['sql_tbl_prefix'].'posts t2 on (t1.tid = t2.topic_id) where t1.forum_id = '.FORUM.' group by t1.tid order by t1.start_date desc limit '.COUNT.';');
if (!empty($result)) {
while ($r = mysql_fetch_array($result)) {

$news ='<a href="'.WWW.'forum/index.php?showtopic='.$r[0].'">'.$r[1].'</a><br/>';
$news =$r[5].'<br/>';
$news =$r[3].' '.date('Y.m.d.', $r[2]).' Komentāri('.$r[4].')<br/>';
$news ='<hr/>';
}
} else {
$news = 'Ziņu ieraksti nav atrasti';
}

echo $news;
mysql_close($link);
?>


Ja kas, pamegini arii:

CODE
<?php

include_once('forum/conf_global.php');
define('WWW','http://uoc.lv/');
define('COUNT',10);
define('FORUM',2);

$news = '';

$link = mysql_connect($INFO['sql_host'],$INFO['sql_user'],$INFO['sql_pass']);
mysql_query('use '.$INFO['sql_database'].';');

$result = mysql_query('select t1.tid,t1.title,t1.start_date,t1.starter_name,t1.posts,t2.post from '.$INFO['sql_tbl_prefix'].'topics t1 join '.$INFO['sql_tbl_prefix'].'posts t2 on (t1.tid = t2.topic_id) where t1.forum_id = '.FORUM.' group by t1.tid order by t1.start_date desc limit '.COUNT.';');
if (!empty($result)) {
while ($r = mysql_fetch_array($result)) {
//Izvades bloks
$news .='<a href="'.WWW.'forum/index.php?showtopic='.$r[0].'">'.$r[1].'</a><br/>';
$news .=$r[5].'<br/>';
$news .=$r[3].' '.date('Y.m.d.', $r[2]).' Komentāri('.$r[4].')<br/>';
$news .='<hr/>';
}
} else {
$news = 'Ziņu ieraksti nav atrasti';
}

echo $news;
mysql_close($link);
?>

0

#9 User is offline   fans Icon

  • Lasu noteikumus
  • Icon
  • Group: Lietotājs
  • Posts: 5
  • Joined: 26-November 09

Posted 26 November 2009 - 04:35 PM

Paldies tas otrais strādāja smile.gif
pasaki lūdzu savu skaip niku!
Gribēju vel par diviem skriptiem kko uzjautāt smile.gif

0

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users