{TEASER_EX} Replacement tag v1.90 - 10.1.2007

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
1996 328ti
Posts: 317
Joined: Mon 19. Apr 2004, 06:10
Location: Greenville, SC USA
Contact:

Post by 1996 328ti »

erich_k4 wrote:i did a fresh install of phpwcms v1.2.6-DEV 14.12.2005, placed your mynewslist.tmpl in the phpwcms_template\inc_cntpart\articlesummary\list-Folder and it works ...??
Checked my config file. All OK.
Template is in the correct directory.
It was been working with V1.0.5 until my host moved the site to a new server and upgraded php.
I have been overwriting files as updates are posted. I never did a complete, clean install. I will try that on my test site and give it a go.

Thanks again for your assistance.

Edit: I overwrote all my files with a clean install and it is working. :)
Somewhere along the way a file was changed and may have not been included in the updates.

Next step is to go over my replacement tags and mods to be sure that are added to the new files. I'm on my way. Thanks!
1996 328ti
Posts: 317
Joined: Mon 19. Apr 2004, 06:10
Location: Greenville, SC USA
Contact:

Post by 1996 328ti »

Well to continue. :(
Overwriting all my files did not help after all.
I have 3 templates. I only use template3 though.
If I select the first template I created and assign it in the site structure the tag works fine. That is I can use my listtemplate. Template2 and template3 do not work. All I get are the 'page 1 2 3 all' at the bottom. No articles.

My first template has coding in the header, main, left, footer.
Template3 (the one I use) only has html coding in the main section.
I copied the coding into the first template and it still would not work.
I'm perplexed. :roll:

EDIT: Created a brand new layout and template. I the tag worked until I added my users_online tag.
http://www.phpwcms.de/forum/viewtopic.php?t=8377
There is some sort of conflict with it.
jareeq
Posts: 22
Joined: Wed 15. Feb 2006, 21:49
Contact:

Post by jareeq »

jareeq wrote:Hi,
I have some problems with number of articles displayed in categories, i'v used generator to create :

Code: Select all

{TEASER_EX:pucharzd|3;ludzie|1;galeria|1;spotkania|1;plpuchar|1:6:article_created|DESC:1:Strona:2::ex.tmpl:24:Wszystkie}
It seems like setting number of articles for particular category alias affect other aliases, it looks like:

changes in 'pucharzd' realy change 'pucharzd'
but:
changes in 'ludzie' realy change 'plpuchar'
changes in 'galeria' realy change 'ludzie'
changes in 'spotkania' realy change 'galeria'
changes in 'plpuchar' realy change 'spotkania'

With 6 category aliases this is more complicated.

So my question is what is wrong, it is possible that this fault is a result of sequence of aliases in the page tree ? Or something wrong with phpwcms ?

mysql 2.1.14
phpwcms v1.2.6-DEV 14.12.2005
TEASER_EX Version 1.51

And there is tree of the page, TEASER_EX tag is located in 'Atualności' (article with clear text contentpart)

Aktualności
-Federacja
--Członkowie (alias:ludzie ID:11)
--Historia
--Galeria (alias:galeria ID:13)
-Wydarzenia
--Liga
--Puchar Polski (alias:plpuchar ID:10)
--Puchar ZD (alias:pucharzd ID:8)
--Spotkania (alias:spotkania ID:14)
Anybody ?

next thig is there no possible way to sort articles by article_created, _end, _begin , _tstamp etc.
it looks like mod takes first 2 articles (when number of ardicles is set to 2) and then sort them, if I set 'article_created' and in category are 3 articles or even 'article_end' and there is no newest article in array. I'v cheked all possible combinations of sortfield and sortdir.
erich_k4
Posts: 160
Joined: Thu 31. Mar 2005, 10:29
Location: Austria

Post by erich_k4 »

@jareeq

Are you sure that your mysql version is mysql 2.1.14?

Teaser_ex requires at least mysql 3.2.x!

Erich
jareeq
Posts: 22
Joined: Wed 15. Feb 2006, 21:49
Contact:

Post by jareeq »

@erich_k4

sorry ofcourse 4.1.14
erich_k4
Posts: 160
Joined: Thu 31. Mar 2005, 10:29
Location: Austria

Post by erich_k4 »

jareeq wrote:@erich_k4

sorry ofcourse 4.1.14
Are we talking about your site at http://www.fzd.kom.pl/?

This newspage seems ok to me!

Note that the category's are not sorted in detail, the overall sql-result is sorted by whatever you set for the sortfield/sortdirection.


Erich
jareeq
Posts: 22
Joined: Wed 15. Feb 2006, 21:49
Contact:

Post by jareeq »

Yes I am talking about this site
:-)
but in category 'Członkowie' (alias:ludzie) there are 3 topics (look in Federacja->Członkowie) I suppose, that with settings (this is set now):

Code: Select all

{TEASER_EX:[b]ludzie|2[/b];galeria|2;liga|2;plpuchar|2;pucharzd|2;spotkania|2:6:[b]article_created|DESC[/b]:1:Strona:2::ex.tmpl:24:Wszystkie}
article with newest date will be displayed because it's date is 19/02/2006 but no matter how I choose sort order or sort field Article about Piotrj is not shown. (sortorder in phpwcms is created/descending) The same is in Wydarzenia-> Puchar Polski (alias:puchar) newest article is also not shown (title: 'Za burtą PP') . When i change article_created to something else, articles 'Za burtą PP and 'Piotrj' are not displayed.

Jarek

And can You tell me what about first question about changing number of displayed articles ?
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Post by update »

Hi,

as far as I got it I've had a similar problem while pulling articles out of more than one (1) Cat:

Code: Select all

{TEASER_EX:pucharzd|3;ludzie|1;galeria|1;spotkania|1;plpuchar|1:6:article_created|DESC:1:Strona:2::ex.tmpl:24:Wszystkie}
You try (same as me)to pull 7 articles and try to display 6. Try to display all (7) instead of only 6!
For me this did the trick.

Greetings
claus
jareeq
Posts: 22
Joined: Wed 15. Feb 2006, 21:49
Contact:

Post by jareeq »

@claus

You have right about displaing only one article, everything is in perfect.

But adding more articles every time when we publish new article, to display in TEASER_EX destroing news idea :-)
Ussualy we want to display only one or two new articles, increasing number of displayed articles, increase also number of unwanted or old topics.

I think there is a problem no wit sorting but before it - with articles in array witch is sorted

Now I'am investigating :-)
erich_k4
Posts: 160
Joined: Thu 31. Mar 2005, 10:29
Location: Austria

Post by erich_k4 »

jareeq wrote:@claus

You have right about displaing only one article, everything is in perfect.

But adding more articles every time when we publish new article, to display in TEASER_EX destroing news idea :-)
Ussualy we want to display only one or two new articles, increasing number of displayed articles, increase also number of unwanted or old topics.

I think there is a problem no wit sorting but before it - with articles in array witch is sorted

Now I'am investigating :-)
I think i got it!!

It's a ugly litte bug in the sql-statement. :D

Update will be available soon. In the meantime add the following

Code: Select all

if ($c_article_id) $sql .= " AND article_id NOT IN ($c_article_id) ";
$sql .= $sqlorder; // ADD THIS LINE !!! (Linenumber 236)
if ($alias[$i]['topcount'] >= 1) $sql .= " LIMIT .$alias[$i]['topcount'];
Please tell me if it works for you!

Erich
jareeq
Posts: 22
Joined: Wed 15. Feb 2006, 21:49
Contact:

Post by jareeq »

ok you are faster than me i found it 5 seconds ago :D
jareeq
Posts: 22
Joined: Wed 15. Feb 2006, 21:49
Contact:

Post by jareeq »

@erich_k4

ok now the second thig i found that:

Code: Select all

{TEASER_EX:ludzie|2;galeria|2;liga|2;plpuchar|3;pucharzd|2;spotkania|2:6:article_created|DESC:1:Strona:2::ex.tmpl:24:Wszystkie}
look at http://www.fzd.kom.pl 3 topics appears in category alias:ludzie not in plpuchar but I found that:

8 Puchar ZD
9 Liga
10 Puchar Polski
11 Członkowie
13 Galeria
14 Spotkania

and now its clear - the name of alias is not the key, it is category ID, if we put in tag aliases sorting by increasing category id - all shoud be right :-)

I don't think thats a bug :-) but perhaps when it stay like it is, it shoud be mentioned in generator and tag example (categories aliases must to be typed in ascending order)??

Code: Select all

{TEASER_EX:pucharzd|2;liga|2;plpuchar|2;ludzie|3;galeria|2;spotkania|2:6:article_created|DESC:1:Strona:2::ex.tmpl:24:Wszystkie}
code above works like expect.
crimi
Posts: 2
Joined: Tue 28. Feb 2006, 19:20

Post by crimi »

I use MySQL 3.23.37 and PHP Version 4.3.1

and

Code: Select all

{TEASER_EX:test1|-1;test2|-1:4:article_title|ASC:0:Seite:2::teaser.tmpl:-1:}
If I just try this teaser tag with only test1 or test 2 it works. But if I try both of them at the same time I get this answer

Insert failed!
Insert failed!

I have already checked, if I have the right reptag_teaser_ex.php (MySQL 3)

I need help
erich_k4
Posts: 160
Joined: Thu 31. Mar 2005, 10:29
Location: Austria

Post by erich_k4 »

crimi wrote:I use MySQL 3.23.37 and PHP Version 4.3.1

and

Code: Select all

{TEASER_EX:test1|-1;test2|-1:4:article_title|ASC:0:Seite:2::teaser.tmpl:-1:}
If I just try this teaser tag with only test1 or test 2 it works. But if I try both of them at the same time I get this answer

Insert failed!
Insert failed!

I have already checked, if I have the right reptag_teaser_ex.php (MySQL 3)

I need help
How many articles are in category test1 and test2?
Maybe its a memory restriction on your mysql server...
crimi
Posts: 2
Joined: Tue 28. Feb 2006, 19:20

Post by crimi »

I have only one article for every category.
I tried already 1 instead of -1 but it won't work either(one article only).

By the way if I try serveral article for only one category it shows all of them. But if I try two categories at the same time like I have already shown above it won't work.

there is always this mistake

insert failed
insert failed

It looks like the mysql database doesn't know how to handle it.

(ps.: I use phpwcms 1.2.6 and checked already if I have your correct Teaser_EX for mysql3.2)
Post Reply