Skinbase.org Skinbase.org

Newspic-Desperation

By letsrock
7,813 views 46 replies
peter_vazed avatar
peter_vazed
Member
OP
This one? anotherstammtisch.jpg <br /> <br /><b>and referenced the local db.inc.php in the newman_lib.php</b> <br />Have you a second db.inc.php? <br />This had to go in the webmagazine folder. <br />And link to it in the index: <br />require (&quot;db.inc.php&quot;); <br /> <br /> <br />use the full url in this db.inc.php if it does not work: <br />$news_pics_path= &quot;/data/members/free/tripod/nl/d/v/z/dvz/htdocs/newman/gfx/news&quot;; <br />$news_pics_url= &quot;h t t p://members.lycos.nl/dvz/newman/gfx/news/&quot;; <br /> <br /> <br /> <br /> 🍺

Edited

peter_vazed avatar
peter_vazed
Member
Ok, now i can login with Internet Explorer. <br />I can add news and upload a picture, even insert a picture in Preview. <br /> <br />But IE closes when i hit Submit to post the news. <br />This happend twice. <br /> <br />And when i am in to write the news, <br /> in the left bottom of IE there is a javascript error. <br /> <br />Just used my test page , did the same news and no errors came up. <br /> <br />See how to ad a picture to the Preview: <br />http://members.lycos.nl/dvzdirect/produkten/index.php <br /> <br />:car <br /> <br /> <br />
peter_vazed avatar
peter_vazed
Member
No, you have to add a line. <br /> <br />I have uploaded the newman_lib file <br />So you can download it. <br />The link: <br />http://members.lycos.nl/vazed/webmagazine/newman_lib.txt <br /> <br />Open in your editor and save as php. <br />If you use ConText you will she the colored code and the lines. <br /> <br />The changes i made are as comments in the file. <br /> <br />Play safe: <br /> never change and save a php file, but rename the old one to old_filename. <br />The new one has the original filename. If something goes wrong, you still have the old file to start over. <br /> <br /> <br /> <br /> <br />:car

Edited

letsrock avatar
letsrock
Member
i think we finally have to change the paths: <br /> <br />www.rotschrift.net.tf
letsrock avatar
letsrock
Member
the only &quot;improvement&quot; was that the little arrows (more.gif) didn&acute;t work any more like they didn&acute;t work some time before. so i took my old newman_lib.php back...
letsrock avatar
letsrock
Member
to be honest, i can&acute;t see any difference between your newman_lib and mine in the concerning piece of code...
peter_vazed avatar
peter_vazed
Member
Yep, the same. <br /> <br />About the more gif, this gif is not in the webmagazine gfx, so it did not show up. <br />If you copy the gif from newman gfx to webmagazine gfx it works, <br /> <br />Now the Preview image. <br /> <br />Have you add the image: <br />Newman - News - Add news <br />in <br />Preview at the right: &quot;add picure&quot; <br /> <br />:car
peter_vazed avatar
peter_vazed
Member
Troubles. <br /> <br />I already had used the sign-in in your Webmagazine. <br />Received an email with username and pasword. <br />But login is not possible. <br />So i cannot add comments. <br /> <br />Now in your newman the same: cannot login. <br /> <br />About the Add Picture. <br />This cannot be done in Netscape. <br />You have to use Internet Explorer. <br />A popup window will show up, but it uses a javacript and <br />in Netscape it does nothing. <br /> <br /> <br />:car
letsrock avatar
letsrock
Member
know what the problem was? <br /> <br />in the default db.inc.php there is NO $news_pics_url, but only a $news_url so it would be nice to add this reference in the future versions.
letsrock avatar
letsrock
Member
believe it or not, but the page is working <br /> <br />thank you very, very much for all your support - i really appreciate that!
peter_vazed avatar
peter_vazed
Member
Yes i have seen it. <br />Great. :magic <br /> <br />And i saw that the test &quot;Preview image&quot; i did was submitted. <br />Even the Comment on the news was there. <br /> <br />Good luck with the site. <br /> <br />Just one thing: center the page. <br />Can be done in header.php just center the first two tables. <br /> <br />Up to the next error :winter <br /> <br />:car
letsrock avatar
letsrock
Member
hehe - here it is: the next error! <br /> <br />can you explain, why the news ticker on the right side isn&acute;t working any more all of a sudden?
peter_vazed avatar
peter_vazed
Member
Errors? <br />Well, the output is html. <br />So: vieuw source or Netscape CTRL U <br /> <br />See: <br />body <br />just 8 lines before where the script starts. <br /> <br />What is the body tag doing there? <br /> <br />All the scriptcode is there. <br />It does not show up. <br /> <br />What have you changed? <br /> <br /> <br />:car

Edited

letsrock avatar
letsrock
Member
as far as i know, nothing has been changed (at least i didn&acute;t change anything) - what about overwriting the concerning file?
letsrock avatar
letsrock
Member
i could just overwrite the index.php with an older one, couldn&acute;t i?
letsrock avatar
letsrock
Member
no, this doesn&acute;t help...
letsrock avatar
letsrock
Member
in my opinion, it must have to do with this (see below) function: <br /> <br />function ShowScrollNews($num,$delay=3000,$width=150,$height=150,$type=0) <br />{ <br />?> <br /> language=&quot;JavaScript1.2&quot;> <br /> var delay=<?=$delay;?> //set delay between message change (in miliseconds) <br /> var fcontent=new Array() <br /> begintag=&acute;<font face=&quot;Arial&quot; size=2>&acute; //set opening tag, such as font declarations <br /> <? <br /> if ($type == 1) $types = &quot;RAND()&quot;; <br /> else $types = datum; <br /> <br /> $x = 0; <br /> $res = mysql_query(&quot;SELECT * FROM &quot;.$GLOBALS[&acute;db_news&acute;].&quot; ORDER BY &quot;.$types.&quot; DESC LIMIT &quot;.$num) or die(&quot;LINE 1074: &quot;.mysql_error()); <br /> while($ar = mysql_fetch_array($res)) <br /> { <br /> $ar[preview] = eregi_replace(&quot;\n&quot;,&quot;&quot;,$ar[preview]); <br /> $ar[preview] = eregi_replace(&quot;\r&quot;,&quot;&quot;,$ar[preview]); <br /> $ar[preview] = wordwrap($ar[preview], 25, &quot; &quot;, 1); <br /> <br /> echo &acute;fcontent[&acute;.$x.&acute;]=&quot;<b><a href=\&quot;&acute;.$GLOBALS[&acute;PHP_SELF&acute;].&acute;?action=show&amp;type=news&amp;id=&acute;.$ar[id].&acute;\&quot;>&acute;.$ar[headline].&acute;</a></b><br/><span class=\&quot;smlText\&quot;>&acute;.substr(pic($ar[preview],0), 0, 100).&acute;...</span> &nbsp;&nbsp;<a href=\&quot;&acute;.$GLOBALS[&acute;PHP_SELF&acute;].&acute;?action=show&amp;type=news&amp;id=&acute;.$ar[id].&acute;\&quot;><img src=\&quot;./gfx/more.gif\&quot; border=\&quot;0\&quot; alt=\&quot;\&quot;/></a>&quot;&acute;.&quot;\n&quot;; <br /> $x++; <br /> } <br /> ?>
letsrock avatar
letsrock
Member
very, very strange... <br />try to hit f5 a couple of times or browse around on the site and then go back to the index and all of a sudden the ticker works again...
letsrock avatar
letsrock
Member
you mean i have to replace the above code by the beneath one?
letsrock avatar
letsrock
Member
sure i got a second db.inc.php - the one in the /newman-folder <br /> <br />i&acute;ll try the changes tomorrow - thanks for your help in the meantime and greets from austria, <br />stefan
peter_vazed avatar
peter_vazed
Member
There are more bugs. <br />Sometimes it is hard to find where the error is. <br />The db.inc is created by the install file. <br />So the install file needs a few more lines. <br /> <br /> <br />gts <br />Peter V
letsrock avatar
letsrock
Member
now i have the problem that the pictures directly on the main page won&acute;t be found - see yourself at above link - perhaps you know more &acute;bout this... <br /> <br />as you can see, i already managed to show the in-text-pics...
letsrock avatar
letsrock
Member
so what more paths can be missing? <br /> <br />i&acute;m posting my db.inc.php: <br /> <br /><? <br />$db_server = &quot;localhost&quot;; <br />$db_uname = &quot;XXXX&quot;; <br />$db_pass = &quot;XXXX&quot;; <br />$db_name = &quot;letsrock&quot;; <br />$db_admin = &quot;admin&quot;; <br />$db_groups = &quot;groups&quot;; <br />$db_news = &quot;news&quot;; <br />$db_news_pics = &quot;news_pics&quot;; <br />$db_news_comments = &quot;news_comments&quot;; <br />$db_news_logged = &quot;news_logged&quot;; <br />$db_partners = &quot;partners&quot;; <br />$db_pnews = &quot;pnews&quot;; <br />$db_story = &quot;story&quot;; <br />$db_smileys = &quot;smileys&quot;; <br />$db_topic = &quot;topic&quot;; <br />$db_users = &quot;users&quot;; <br />$db_weekQ = &quot;weekQ&quot;; <br />$db_weekA = &quot;WeekA&quot;; <br />$db_weather = &quot;weather&quot;; <br />$db_rss = &quot;rss&quot;; <br />$db_gallery_groups = &quot;gallery&quot;; <br />$db_gallery = &quot;pictures&quot;; <br />$smileys_path = &quot;/usr/export/www/vhosts/funnetwork/hosting/letsrock/rotschrift/newman/gfx/smileys&quot;; <br />$smiley_url = &quot;../newman/gfx/smileys/&quot;; <br />$partners_path = &quot;/usr/export/www/vhosts/funnetwork/hosting/letsrock/rotschrift/newman/gfx/partners&quot;; <br />$partners_url = &quot;../newman/gfx/partners/&quot;; <br />$topic_path = &quot;/usr/export/www/vhosts/funnetwork/hosting/letsrock/rotschrift/newman/topic&quot;; <br />$topic_url = &quot;../newman/topic&quot;; <br />$rss_path = &quot;/usr/export/www/vhosts/funnetwork/hosting/letsrock/rotschrift/newman/rss&quot;; <br />$news_pics_path = &quot;/usr/export/www/vhosts/funnetwork/hosting/letsrock/rotschrift/newman/gfx/news&quot;; <br />$news_pics_url = &quot;http://letsrock.le.funpic.de/rotschrift/newman/gfx/news/&amp;quot;; <br />$news_path = &quot;/usr/export/www/vhosts/funnetwork/hosting/letsrock/rotschrift/newman/gfx/news&quot;; <br />$news_url = &quot;http://letsrock.le.funpic.de/rotschrift/newman/gfx/news/&amp;quot;; <br />$gallery_path = &quot;/usr/export/www/vhosts/funnetwork/hosting/letsrock/rotschrift/newman/gfx/gallery&quot;; <br />$gallery_url = &quot;../newman/gfx/gallery/&quot;; <br />$weather_path = &quot;/usr/export/www/vhosts/funnetwork/hosting/letsrock/rotschrift/newman/gfx/weather&quot;; <br />$weather_url = &quot;../newman/gfx/weather/&quot;; <br />?>
letsrock avatar
letsrock
Member
oh, i found a new reason: <br /> <br />the missing pic is the one with the two little arrows (more.gif) and it works (as you can see) when set in &quot;breaking news&quot; but it doesn&acute;t if set in &quot;visible news&quot; <br /> <br />cool, ha?
peter_vazed avatar
peter_vazed
Member
This one: <br /> <br />$story_path = &quot;/data/members/free/tripod/nl/d/v/z/dvzdirect/htdocs/produkten/newman/gfx/news&quot;; <br />$story_url = &quot;./newman/gfx/news/&quot;; <br /> <br />=========== <br />If you get a problem with topic, add a / at the end: <br />$topic_url = &quot;./newman/topic/&quot;; <br />you have: <br />$topic_url = &quot;../newman/topic&quot;; <br /> <br />================ <br />Adjust <br />in header.php <br />To set the colors of the menu you have to open header.php <br />Now set the bgcolor. <br /> <br />To center the page use center in the table. <br /> <br />============ <br />In newmanlib line 1096 and line 1126 you can find galerija and change it in your own language. <br /> <br />============== <br /> <br />gts <br />Peter V <br />
letsrock avatar
letsrock
Member
thanks, i fixed this one, but i already got another prob (i know, i&acute;m strenuous!) <br /> <br />the menu doesn&acute;t work properly anymore, all links seem to be the same... (just look for yourself)
peter_vazed avatar
peter_vazed
Member
What do you mean? <br />What have you changed? <br /> <br />
letsrock avatar
letsrock
Member
just try clicking through the menu items on the right side and you will always get the same news instead of the gallery etc. <br /> <br />i&acute;m not sure what i changed that affected the menu
letsrock avatar
letsrock
Member
oh sorry i meant on the LEFT side
letsrock avatar
letsrock
Member
so, i think now you should see the errors - i have added an item in each category
peter_vazed avatar
peter_vazed
Member
Jetzt ist es wieder gut. <br /> <br /> <br />gts <br />Peter V <br /> <br /> <br />

Edited

letsrock avatar
letsrock
Member
no, the weekly poll (&quot;umfragen&quot;) doesn&acute;t work
letsrock avatar
letsrock
Member
neither does the user menu
letsrock avatar
letsrock
Member
okay, at least the user menu doesn&acute;t work, hehe... <br /> <br /> <br />p.s.: sorry for bugging you all the time
letsrock avatar
letsrock
Member
one little thing... <br /> <br />how do i make the news-pictures appear on the index-site (as you can see here: http://neues.ratelon.de)?
peter_vazed avatar
peter_vazed
Member
In newman_lib <br /> <br /> <br />line 414 <br />//added this part to show picture is in the news preview <br /> <br /> <br /><xmp> <br /><?if(!empty($ar[picture]) && file_exists.($GLOBALS[&acute;news_pics_path&acute;].$ar[picture])) <br /> echo &acute;<img src=&quot;&acute;.$GLOBALS[&acute;news_pics_url&acute;].$ar[picture].&acute;&quot; align=&quot;left&quot; style=&quot;padding-right:5pt;&quot; alt=&quot;&quot; />&acute;;?> <br /></xmp> <br /> <br /> <br />In this table: <br /> <br /> <br /><xmp> <br /> <table width=&quot;100%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;1&quot; class=&quot;MojText&quot;> <br /> <tr><td class=&quot;MojHead&quot;><a class=&quot;MojHead&quot; href=&quot;<?=$GLOBALS[&acute;PHP_SELF&acute;];?>?action=show&amp;type=news&amp;id=<?=$ar[id];?>&quot;> <br /><?=$ar[headline];?></a></td></tr> <br /> <tr><td><?=$datum;?> / <a href=&quot;mailto:<?=$ar2[email];?>&quot;><?=$ar[author];?></a></td></tr> <br /> <tr><td><p style=&quot;width:100%; text-align:justify;&quot; class=&quot;MojText&quot;> <br /> //added this part to show picture is in the news preview <br /> <?if(!empty($ar[picture]) && file_exists.($GLOBALS[&acute;news_pics_path&acute;].$ar[picture])) <br /> echo &acute;<img src=&quot;&acute;.$GLOBALS[&acute;news_pics_url&acute;].$ar[picture].&acute;&quot; align=&quot;left&quot; style=&quot;padding-right:5pt;&quot; alt=&quot;&quot; />&acute;;?> <br />//end added <br /> <br /></xmp> <br /> <br />Code is messed up here, but it is the same code as on line 1153 <br />there is one for the gallery <br /> <br />:car <br /> <br />

Edited

letsrock avatar
letsrock
Member
what about this: i mail you my newman_lib.php and you can change it &quot;on the fly&quot; - good idea?
onuzu avatar
onuzu
Member
I have the same problem but your explanation a bit too advance for me. I cannot add photos to news, The new ticker is not working, if I try to upload photos to news I get these messages: <br /> <br />LINE 262:Unknown column &acute;thumbnail&acute; in &acute;field list&acute; <br /> <br />LINE 42:Unknown column &acute;gid&acute; in &acute;where clause&acute;
peter_vazed avatar
peter_vazed
Member
Hi onuzu, <br /> <br />see my test site: <br />http://members.lycos.nl/vazed/webmagazine/ <br /> <br />There you can download the files. <br />There were a few errors in the original script. <br />Click the link: &acute;Read This First&acute; <br /> <br />You can browse this forrum, to find out what was wrong. <br />Like gid has to be id, thumbnail is wrong to. <br />The first script was OK. <br />After adding new items, a few old codes were still in the script <br />thats why you get the errormessages. <br /> <br />:car <br /> <br /> <br />
onuzu avatar
onuzu
Member
Hi Peter, <br /> <br />Thanks very much, I re intalled the program it got better but when I tried to upload a photo I got the following message: <br /> <br />First it shows Error! When I click on the alert pop up I got: Warning: move_uploaded_file(/home/virtual/site19/fst/home/thismonth/public_html/WebMagazine/newman/gfx/gallery/4A90799775.jpg): failed to open stream: Permission denied in /home/virtual/site19/fst/home/thismonth/public_html/WebMagazine/newman/pictures.php on line 375 <br /> <br />Warning: move_uploaded_file(): Unable to move &acute;/tmp/php9IGJEU&acute; to &acute;/home/virtual/site19/fst/home/thismonth/public_html/WebMagazine/newman/gfx/gallery/4A90799775.jpg&acute; in /home/virtual/site19/fst/home/thismonth/public_html/WebMagazine/newman/pictures.php on line 375 <br /> <br />Do you know how I can fix this? <br /> <br />Thanks
peter_vazed avatar
peter_vazed
Member
&acute;failed to open stream: Permission denied&quot; <br /> <br />Most of the time a chmod <br />Try setting: 755 or 644 <br /> <br /> <br />If not working, read this: <br /> <br />In the file db.inc.php <br />you have the path to the items: <br />smilys, partners, topic, news <br />gallery, weather, story and news_pics <br /> <br />Download the db.inc.php to your computer ( in a different folder) look if the items are there. <br />Like this below: <br /> <br />$smileys_path = &quot;d:\www\zeepoort.nl\www\dvzkruiningen\newman\gfx\smileys&quot;; <br />$smiley_url = &quot;./gfx/smileys/&quot;; <br />$partners_path = &quot;d:\www\zeepoort.nl\www\dvzkruiningen\newman\gfx\partners&quot;; <br />$partners_url = &quot;./gfx/partners/&quot;; <br />$topic_path = &quot;d:\www\zeepoort.nl\www\dvzkruiningen\newman\topic&quot;; <br />$topic_url = &quot;./topic/&quot;; <br />$rss_path = &quot;d:\www\zeepoort.nl\www\dvzkruiningen\newman\rss&quot;; <br />$news_path = &quot;d:\www\zeepoort.nl\www\dvzkruiningen\newman\gfx\news&quot;; <br />$news_url = &quot;./gfx/news/&quot;; <br />$gallery_path = &quot;d:\www\zeepoort.nl\www\dvzkruiningen\newman\gfx\gallery&quot;; <br />$gallery_url = &quot;./gfx/gallery/&quot;; <br />$weather_path = &quot;d:\www\zeepoort.nl\www\dvzkruiningen\newman\gfx\weather&quot;; <br />$weather_url = &quot;./gfx/weather/&quot;; <br />$story_path = &quot;d:\www\zeepoort.nl\www\dvzkruiningen\newman\gfx\news&quot;; <br />$story_url = &quot;./gfx/news/&quot;; <br />$news_pics_path = &quot;d:\www\zeepoort.nl\www\dvzkruiningen\newman\gfx\news&quot;; <br />$news_pics_url = &quot;./gfx/news/&quot;; <br /> <br />Of not add them by hand, and upload the file. <br />Rememeber, never overwrite an existing file, unlless you have a copy of the original. <br />On your server you firtst can renema the original to old_filename.php <br /> <br />This are the lines on my lycos site: <br />$smileys_path = &quot;/data/members/free/tripod/nl/v/a/z/vazed/htdocs/webmagazine/newman/gfx/smileys&quot;; <br />$smiley_url = &quot;./newman/gfx/smileys/&quot;; <br />$partners_path = &quot;/data/members/free/tripod/nl/v/a/z/vazed/htdocs/webmagazine/newman/gfx/partners&quot;; <br />$partners_url = &quot;./newman/gfx/partners/&quot;; <br />$topic_path = &quot;/data/members/free/tripod/nl/v/a/z/vazed/htdocs/webmagazine/newman/topic&quot;; <br />$topic_url = &quot;./newman/topic&quot;; <br />$rss_path = &quot;/data/members/free/tripod/nl/v/a/z/vazed/htdocs/webmagazine/newman/rss&quot;; <br />$news_path = &quot;/data/members/free/tripod/nl/v/a/z/vazed/htdocs//newman/gfx/news&quot;; <br />$news_url = &quot;./newman/gfx/news/&quot;; <br />$gallery_path = &quot;/data/members/free/tripod/nl/v/a/z/vazed/htdocs/webmagazine/newman/gfx/gallery&quot;; <br />$gallery_url = &quot;http://members.lycos.nl/vazed/webmagazine/newman/gfx/gallery/&amp;quot;; <br />$weather_path = &quot;/data/members/free/tripod/nl/v/a/z/vazed/htdocs/newman/gfx/weather&quot;; <br />$weather_url = &quot;./newman/gfx/weather/&quot;; <br /> <br />Different from the one above. <br />Because we have two parts: Newman and Webmagazine. <br /> <br />Just depending on the way you set it up. <br />You can have a folder Webmagaxine and in this folder a folder Newman. <br />Or you have a folder Webmagazine and a folder Newman in the root. <br /> <br />And you need TWO db.inc.php files. <br />The original one is in Newman. This is OK after the install. <br />A copy of the file has to go in Webmagazine, and in this file you have to set the path to Newman. The script has to know where the files are. <br /> <br />BTW <br />the newman script is not running under PHP5 <br />On lycos with PHP4 it is doing fine. <br /> <br />There are different versions of php an mysql. <br />That&acute;s why not al scripts will run on all servers. <br /> <br />:car
hestanoff avatar
hestanoff
Member
how come you folks r not gettin tired typin all of dat shit i wonder? dam i admire you eggheads!!!!
peter_vazed avatar
peter_vazed
Member
Tired? <br />Not at all. <br />PHP is like a puzzle sometimes. <br /> <br />This script is not working under PHP5, so i bought a book: PHP5 <br />to find out how to change the code from php4 to php5. <br /> <br />Eggheads? <br />How come? <br />Now i am trying to find out how this is done: <br />http://www.accessiblesystems.com/etfiles/et.htm <br />so i can build my own. <br />Making a drawing, cutting the iron, welding and painting. <br /> <br />My old Ford Escort needs welding at the bottom, so it has to turn. <br /> <br />The day has 24 hours, i need 36 :smile: <br /> <br />:car <br /> <br />
islamabadi2k avatar
islamabadi2k
Member
In case of my script i have a problem the picture is uploading properly but i dont know how to link picture with news and i need help. <br /> <br />Thanx in Advance
Sign in to post a reply.